
This involves reading key presses on a standard PS/2 keyboard using the KEYIN command from the Picaxe and then sending the key data to the Arduino. It is all very straightforward, and of course the strain on the Arduino is very minimal (compared to actually trying to code and read the keyboard purely in Arduino).
The good news is that it only uses a few resistors as external electrical components.

Picaxe Code:
main:
keyin
serout 7,N2400(keyvalue)
goto main
Very quick and dirty Arduino code -- at least it sees something!
byte data;
byte old = 0;
void setup() {
Serial.begin(2400);
}
void loop() {
if(Serial.available() > 0) {
data = Serial.read();
if(data != old) {
Serial.print(data, DEC);
old = data;
}
}
}
4 comments:
Excellent project. both on the
Arduino and PICAXE side. It is a common mistake to try to load everything into one micro.
Another use for the PICAXE would be an IR receiver.
TANSTAAFL!
Myc
yes, exactly. i guess, if you have the resources to spare, adding more than one IC or uC to a project is often a good idea and makes the whole thing easier.
great idea!
I am trying now to slave the arduino, using it as a MIDI receiver, and send data to the main Picaxe.
Very insightful!
Post a Comment