Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. //on the sender side
  2. void setup() {
  3. Serial.begin(9600);//this has to match the serial speed you configured for the respective XBee
  4. }
  5. void loop() {
  6. Serial.write(20); //or the value you want to send
  7. }
  8.  
  9. //on the receiver side
  10. int received;
  11. void setup() {
  12. Serial.begin(9600);//this has to match the serial speed you configured for the respective XBee
  13. }
  14. void loop() {
  15. if (Serial.available()) {
  16. received=Serial.read();
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement