![](/media/cache/profiles/cc38c8ffd23cef2e3e5c21d20c1db636.jpg.50x50_q85.png)
all publish
Revision 0:e8affd8e420a, committed 2019-05-06
- Comitter:
- daikinect
- Date:
- Mon May 06 00:21:44 2019 +0000
- Commit message:
- all publish
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 06 00:21:44 2019 +0000 @@ -0,0 +1,23 @@ +#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 + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon May 06 00:21:44 2019 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/64910690c574 \ No newline at end of file