![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
Diff: main.cpp
- Revision:
- 59:237e32fd3555
- Parent:
- 58:738f026cf667
- Child:
- 60:ef4592cf5397
diff -r 738f026cf667 -r 237e32fd3555 main.cpp --- a/main.cpp Wed May 09 14:11:26 2018 +0000 +++ b/main.cpp Wed May 09 14:19:16 2018 +0000 @@ -5,26 +5,23 @@ #include "Receiver.h" #include "LEDDriver.h" -Ticker flipper; +Ticker ledTicker; DigitalOut led2(LED2); LEDDriver *driver; void receive(Queue<int,8>* queue){ - printf("receive executed.\r\n"); Receiver receiver(queue); - printf("Receiver Object created.\r\n"); receiver.start(); } -void flip() { +void driveLeds() { led2 = !led2; driver->drive(8); } int main (void){ - printf("main executed.\r\n"); Queue<int,8> queue; driver=new LEDDriver(&queue); - flipper.attach(&flip, 0.002f); + ledTicker.attach(&driveLeds, 0.002f); receive(&queue); }