I`m trying to send a message (ordinary string, like “id=14,hhmmss”) from Arduino to Flash.
I have loaded Firmata2 to my Arduino and I’m using the glue class at Flash.
this is the basic schema:
(FLASH <-usb-> ARDUINO (firmata2) + XBEE) <–radio–> (XBEE + ARDUINO2(code*))
- The red side sends a number (id) which is caught by the blue side.
- Blue blinks correspondent led and sends a message to red with the current time and blue’s id.
- Flash prints/traces something like: “connection id:blue and id:red at hhmmss”. (where blue, and red are the correspodent ids)
XBees are working fine. I can see they talking to each other. As I send a number using X-CTU’s terminal window, I get the response (in the same terminal window) the way I need.
NOW, THE PROBLEM: putting FLASH to work;
WHAT I NEEDED TO DO:
#1) Flash to send an id number so arduino can spread with xbee.
#2) Flash to receive serial message (string from arduino) to print/trace;
WHAT I KNOW HOW TO DO TO WORK AROUND TEMPORALY
this solves #1 above:
Append at firmata code the line:
int redID = 14;
So it doesnt need to receive redID from Flash (what is wrong, indeed).
cant solve #2 at all:
I tryed to read something about Firmata.sendSysex, but couldnt figure it out. If someone could give me some directions that would help a lot.
*code: code in blue side is working. After receiving an ID (like “14”) it uses Serial.print(blueID,redID,hhmmss);
Thanks in advance,