Professional Documents
Culture Documents
Xbee RX
Xbee RX
void setup() {
Serial.begin(9600);//Remember that the baud must be the same on both arduinos
pinMode(led,OUTPUT);
}
void loop() {
while(Serial.available() > 0) {
msg=Serial.read();
if(msg=='H') {
digitalWrite(led,HIGH);
}
if(msg=='L') {
digitalWrite(led,LOW);
}
msg = ' ';
delay(1000);
}
}