klavesnice pro unikovku
[mirrors/Programs.git] / arduino / bomba-ps2test / bomba-ps2test.ino
1 #include <ps2dev.h>
2
3 PS2dev keyboard(19, 18); //clock, data
4
5 void make_break_kb(byte data)
6 {
7 // makes and breaks the key
8 keyboard.write(data);
9 delay(50);
10 keyboard.write(0xF0);
11 delay(50);
12 keyboard.write(data);
13 delay(50);
14 }
15
16 void setup() {
17 }
18
19 char scancodes[] = {0x45, 0x16, 0x1E, 0x26, 0x25, 0x2E, 0x36, 0x3D, 0x3E, 0x46, 0x7C, 0x7C}; //Scancodes for numbers 0-9, *, #
20
21 void loop() {
22 for(int i = 0; i < 11; i++) {
23 make_break_kb(scancodes[i]);
24 delay(1000);
25 }
26 }
This page took 0.332737 seconds and 4 git commands to generate.