alexandre lepretre
/
Seeed_XBee_Shield-2
Alex pour Maxime
Revision 4:ac71d3e16827, committed 2021-10-20
- Comitter:
- jojofannum69
- Date:
- Wed Oct 20 13:31:04 2021 +0000
- Parent:
- 3:3722ae2e3c20
- Commit message:
- Alex
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 3722ae2e3c20 -r ac71d3e16827 main.cpp --- a/main.cpp Fri Feb 13 09:38:52 2015 +0000 +++ b/main.cpp Wed Oct 20 13:31:04 2021 +0000 @@ -29,14 +29,17 @@ * D0 - RX pin (TX on the shield side) * NC - Reset pin; use D5 otherwise the shield might get into reset loop */ -xbee xb(D1, D0, D5); +xbee xb(PA_9,PA_10, NC); +//xbee xb(PA_10,PA_9, NC); int main() { char data[202]; + printf("%d",xb.ConfigMode()); while(1) { - xb.SendData("HellWorld"); // Send "HelloWorld" + printf("Envoie"); + xb.SendData("B\r\n"); // Send "HelloWorld" xb.RecieveData(data, 0); // Read data printf("Received:%s", data); wait(1);