Blame view

code_arduino/com_Xbee/code_emetteur/sketch_may02a.ino 363 Bytes
a4d85595   aknockae   Ajout de serialAr...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  /* Input-side (button) Arduino code */
  #include <SoftwareSerial.h>
  // RX: Arduino pin 2, XBee pin DOUT.  TX:  Arduino pin 3, XBee pin DIN
  SoftwareSerial xBee(2, 3);
  
  void setup()
  {
    // Baud rate MUST match XBee settings (as set in XCTU)
    xBee.begin(9600);
  }
  
  void loop()
  {
  
      xBee.write('H');
      xBee.println("test");
      delay(500);
      xBee.write('L');
  }