On some finals week ish.
We've stripped all of the functions out of the code below and it still acts as though the character is not leaving the sending board.
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial XBee(0, 1); // RX, TX
int fsrAnalogPin = 2;
void setup()
{
XBee.begin(9600);
pinMode(1, OUTPUT);
}
void loop() {
digitalWrite(1, LOW);
if (analogRead(fsrAnalogPin) > 450) {
XBee.write('a');
}
if (XBee.available()) {
char c = XBee.read();
if (c = 'a'){
digitalWrite(1, HIGH);
}
}
}