1 #include <ps2dev.h> // to emulate a PS/2 device
2 PS2dev keyboard(19,18); // PS2dev object (3:clock, 2:data)
3 unsigned long timecount = 0;
7 keyboard.keyboard_init();
9 pinMode(LED_BUILTIN, OUTPUT);
14 //Handle PS2 communication and react to keyboard led change
16 if(keyboard.keyboard_handle(&leds)) {
17 //Serial.print('LEDS');
18 //Serial.print(leds, HEX);
19 digitalWrite(LED_BUILTIN, leds);
22 //Print letter every second
23 if((millis() - timecount) > 1000) {
24 keyboard.keyboard_mkbrk(0x16);