I've been trying to understand how to get this working, I'm new to the Arduino and micro programming, but learning.
I'm confused which pins I should be connecting my keyboard to. In the example the pins are defined as
#define KBD_CLK_PIN 3
#define KBD_DATA_PIN 4
but from a schematic of the Mega I'm understanding that pin 3 is actually INT5 and the attachInterrupt(1, ps2interrupt, FALLING);
which is found in the PS2Keyboard.ccp file should be 5 instead of 1.
Although I must still be doing something wrong as it dosn't yet work.
Any suggestions ?
Also the description at attachInterrupt() - Arduino Reference
"Most Arduino boards have two external interrupts: numbers 0 (on digital pin 2) and 1 (on digital pin 3). The Arduino Mega has an additional four: numbers 2 (pin 21), 3 (pin 20), 4 (pin 19), and 5 (pin 18)."
seems to contradict the schematic http://arduino.cc/en/uploads/Main/arduino-mega-schematic.pdf ?
I must be confusing things and not understanding quite right.