Alexandre Lemay / Mbed 2 deprecated APP3_Coordonator

Dependencies:   mbed

Committer:
evrast
Date:
Mon Oct 02 16:00:50 2017 +0000
Revision:
0:53817a293b39
Child:
1:fe18dd0ba172
first psuh test code;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
evrast 0:53817a293b39 1 #include "mbed.h"
evrast 0:53817a293b39 2
evrast 0:53817a293b39 3 DigitalOut myled(LED1);
evrast 0:53817a293b39 4
evrast 0:53817a293b39 5 Serial pc(USBTX, USBRX);
evrast 0:53817a293b39 6
evrast 0:53817a293b39 7 Serial xBee(p13, p14);
evrast 0:53817a293b39 8 DigitalOut reset(p8);
evrast 0:53817a293b39 9
evrast 0:53817a293b39 10 uint8_t pan_id[14]={0x7E, 0x00, 0x0A, 0x08, 0x01, 0x49, 0x44, 0x46, 0x46, 0x39, 0x39, 0x31, 0x31, 0x09};
evrast 0:53817a293b39 11
evrast 0:53817a293b39 12 int main() {
evrast 0:53817a293b39 13 reset =0;
evrast 0:53817a293b39 14 wait_ms(500);
evrast 0:53817a293b39 15 reset=1;
evrast 0:53817a293b39 16 wait(1);
evrast 0:53817a293b39 17 xBee.printf("+++");
evrast 0:53817a293b39 18 wait(1);
evrast 0:53817a293b39 19 //
evrast 0:53817a293b39 20 // for(int i =0;i <14;i++){
evrast 0:53817a293b39 21 // xBee.putc(pan_id[i]);
evrast 0:53817a293b39 22 // }
evrast 0:53817a293b39 23
evrast 0:53817a293b39 24 while(1) {
evrast 0:53817a293b39 25
evrast 0:53817a293b39 26 if(xBee.readable()){
evrast 0:53817a293b39 27 pc.printf("%x\n",xBee.getc());
evrast 0:53817a293b39 28 }
evrast 0:53817a293b39 29 }
evrast 0:53817a293b39 30 }
evrast 0:53817a293b39 31