demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Revision:
53:b9da0ba69a29
Parent:
51:2d592fa1cad5
Child:
55:b6b2910d00e7
--- a/main.cpp	Wed May 09 11:56:55 2018 +0000
+++ b/main.cpp	Wed May 09 12:29:08 2018 +0000
@@ -7,6 +7,7 @@
 
 Ticker flipper;
 DigitalOut led2(LED2);
+LEDDriver *driver;
 
 void receive(Queue<int,8>* queue){
     printf("receive executed.\r\n");
@@ -15,17 +16,18 @@
     receiver.start();
 }
 
-
-void LEDStart(Queue<int,8>* queue,Ticker* ticker)
+/*
+void CreateLEDDriver(Queue<int,8>* queue,Ticker* ticker)
 {
     printf("LEDStart executed.\r\n");
     LEDDriver driver = LEDDriver(queue);
     printf("LEDDriver created.\r\n");
     driver.run(ticker);    
-} 
+} */
 
 void flip() {
     led2 = !led2;
+    driver->drive(8);
 }
 
 int main (void){
@@ -38,7 +40,7 @@
             //threadeth.start(receive,&queue);
             //driverThread.start(LEDStart,&queue);
         //}
-        
+        driver=new LEDDriver(&queue);
         flipper.attach(&flip, 0.1);
         //LEDStart(&queue,&ticker);
         receive(&queue);