Alexandre Lemay / Mbed 2 deprecated APP3_Coordonator

Dependencies:   mbed

main.cpp

Committer:
evrast
Date:
2017-10-02
Revision:
0:53817a293b39
Child:
1:fe18dd0ba172

File content as of revision 0:53817a293b39:

#include "mbed.h"

DigitalOut myled(LED1);

Serial pc(USBTX, USBRX);

Serial xBee(p13, p14);
DigitalOut reset(p8);

uint8_t pan_id[14]={0x7E, 0x00, 0x0A, 0x08, 0x01, 0x49, 0x44, 0x46, 0x46, 0x39, 0x39, 0x31, 0x31, 0x09};

int main() {
    reset =0;
    wait_ms(500);
    reset=1;
    wait(1);
    xBee.printf("+++");
    wait(1);
    //
//    for(int i =0;i <14;i++){
//        xBee.putc(pan_id[i]);   
//    }
    
    while(1) {

        if(xBee.readable()){
                pc.printf("%x\n",xBee.getc());
            }
    }
}