![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
Diff: main.cpp
- Revision:
- 49:2d592fa1cad5
- Parent:
- 48:c5cd73d93045
- Child:
- 50:dfcd7bd87114
- Child:
- 51:b9da0ba69a29
diff -r c5cd73d93045 -r 2d592fa1cad5 main.cpp --- a/main.cpp Wed May 09 10:08:32 2018 +0000 +++ b/main.cpp Wed May 09 11:56:55 2018 +0000 @@ -5,6 +5,9 @@ #include "Receiver.h" #include "LEDDriver.h" +Ticker flipper; +DigitalOut led2(LED2); + void receive(Queue<int,8>* queue){ printf("receive executed.\r\n"); Receiver receiver(queue); @@ -21,6 +24,10 @@ driver.run(ticker); } +void flip() { + led2 = !led2; +} + int main (void){ printf("main executed.\r\n"); Queue<int,8> queue; @@ -32,7 +39,7 @@ //driverThread.start(LEDStart,&queue); //} - Ticker ticker; - LEDStart(&queue,&ticker); + flipper.attach(&flip, 0.1); + //LEDStart(&queue,&ticker); receive(&queue); }