![](/media/cache/profiles/cc38c8ffd23cef2e3e5c21d20c1db636.jpg.50x50_q85.png)
all publish
main.cpp
- Committer:
- daikinect
- Date:
- 2019-05-06
- Revision:
- 0:e8affd8e420a
File content as of revision 0:e8affd8e420a:
#include "mbed.h" #define NOD 3 char rx_buffer[NOD]; Serial xbee(D1,D0,9600); DigitalOut myled(LED1); const event_callback_t callbackr() { } public void rx_callback() { xbee.read(rx_buffer,NOD,&callbackr); } int main() { xbee.attach(&rx_callback); while(1) { myled = 1; // LED is ON wait(0.2); // 200 ms myled = 0; // LED is OFF wait(1.0); // 1 sec } }