simple zbee receive data

Dependencies:   C12832_lcd mbed zbee_lib

Committer:
ruslylove
Date:
Sat Mar 12 17:49:28 2016 +0000
Revision:
0:c19cf740caf3
Child:
1:f8efb266270f
Child:
2:f0efd0fd3544
simple zbee receive data

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ruslylove 0:c19cf740caf3 1 #include "mbed.h"
ruslylove 0:c19cf740caf3 2 #include "zbee.h"
ruslylove 0:c19cf740caf3 3 #include "C12832_lcd.h"
ruslylove 0:c19cf740caf3 4
ruslylove 0:c19cf740caf3 5 DigitalOut myled(LED1);
ruslylove 0:c19cf740caf3 6 zbee zbee1(p9,p10,ZBEE_BAUD);
ruslylove 0:c19cf740caf3 7 C12832_LCD lcd;
ruslylove 0:c19cf740caf3 8
ruslylove 0:c19cf740caf3 9 char text[50]; // buffer read
ruslylove 0:c19cf740caf3 10
ruslylove 0:c19cf740caf3 11 int main() {
ruslylove 0:c19cf740caf3 12 int i=1;
ruslylove 0:c19cf740caf3 13 while(1) {
ruslylove 0:c19cf740caf3 14 zbee1.ReceiveData(text,11);
ruslylove 0:c19cf740caf3 15 lcd.printf("%i RX <- %s\n",i++,text);
ruslylove 0:c19cf740caf3 16 }
ruslylove 0:c19cf740caf3 17 }