demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
Diff: main.cpp
- Revision:
- 68:df2d20effe00
- Parent:
- 63:ef4592cf5397
--- a/main.cpp Wed May 09 15:31:45 2018 +0000 +++ b/main.cpp Mon May 14 18:48:24 2018 +0000 @@ -5,21 +5,20 @@ #include "Receiver.h" #include "LEDDriver.h" -Ticker ledTicker; -LEDDriver *driver; void receive(Queue<int,8>* queue){ Receiver receiver(queue); receiver.start(); } -void driveLeds() { +void driveLeds(LEDDriver* driver) { driver->drive(8); } -int main (void){ +int main (){ Queue<int,8> queue; - driver=new LEDDriver(&queue); - ledTicker.attach(&driveLeds, 0.002f); + Ticker ledTicker; + LEDDriver* driver=new LEDDriver(&queue); + ledTicker.attach(&driveLeds, driver,0.002f); receive(&queue); }