So heres this video i made and i need help getting it to work. i have 2 arduinos and 2 xbees i havethem hooked up tx-tx and rx-rx. i have confugured them correctly and can talk to eachother. i just cant get it to send the code. The video explians the problem a little more. here is the code i am trying to send its really simple:
Send:
//client
//setup
void setup()
{
//init serial communication
Serial.begin(9600);
}
//main
void loop()
{
//send H
Serial.print('H');
//delay
delay(1000);
//send L
Serial.print('L');
//delay
delay(1000);
}
Receive:
//server
//led pin
const int led_pin = 13;
//incoming data stream
int stream;
//setup
void setup()
{
//init serial communication
Serial.begin(9600);
//init led pin as output
pinMode(led_pin, OUTPUT);
}
//main
void loop()
{
//check incoming data
if(Serial.available() > 0)
{
//read data
stream = Serial.read();
//check data
boolean value = (stream == 'H' ? HIGH : LOW);
//set led pin value
digitalWrite(led_pin, value);
}
}
Thank You