hi, I thought that this would be a good place to start with my first controller. ok so I picked up a Arduino Duemilanove and some proto shields. I poked around for interfacing a ps2keyboard and found it documented in practicalarduino.com, ok so I soldered my 4 wires to the shield 5+, GND, DIO3 (clk), and DIO4 (data) loaded the program, and you know it no good
so It couldn't find my .h file so I changed <> to "" and that helped then changed his loop to:
void loop()
{
if(keyboard.available()) {
byte data = keyboard.read();
// Test for special keys and handle them appropriately
if(data == PS2_KC_ESC) {
Serial.print("[ESC]");}
else {
// Not a special key so print it directly
Serial.println(data, HEX);
}
}
}
pressed the play button and you guessed it. it bombed! here are my error messages:
Ps2Keyboard.cpp.o: In function __static_initialization_and_destruction_0': C:\DOCUME~1\Owner\LOCALS~1\Temp\build4649989503134798539.tmp/Ps2Keyboard.cpp:29: undefined reference to PS2Keyboard::PS2Keyboard()'
Ps2Keyboard.cpp.o: In function loop': C:\DOCUME~1\Owner\LOCALS~1\Temp\build4649989503134798539.tmp/Ps2Keyboard.cpp:49: undefined reference to PS2Keyboard::available()'
C:\DOCUME~1\Owner\LOCALS~1\Temp\build4649989503134798539.tmp/Ps2Keyboard.cpp:50: undefined reference to PS2Keyboard::read()' Ps2Keyboard.cpp.o: In function setup':
C:\DOCUME~1\Owner\LOCALS~1\Temp\build4649989503134798539.tmp/Ps2Keyboard.cpp:35: undefined reference to `PS2Keyboard::begin(int)'
ok thats it.. any help would be appreciated.
Cris H.
oh yes one more where is the "standard place" to stash my .h files?
and where is the best place for my code to be placed?
PS2Keyboard.h (3.88 KB)