Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 } }