![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
main.cpp
- Committer:
- KlaasGovaerts
- Date:
- 2018-05-09
- Revision:
- 55:b6b2910d00e7
- Parent:
- 53:b9da0ba69a29
- Child:
- 61:738f026cf667
File content as of revision 55:b6b2910d00e7:
#include "mbed.h" #include "rtos.h" #include "Interpreter.h" #include "TCPlistener.h" #include "Receiver.h" #include "LEDDriver.h" Ticker flipper; 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 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){ printf("main executed.\r\n"); Queue<int,8> queue; //Thread threadeth; //Thread driverThread; //(true){ //threadeth.start(receive,&queue); //driverThread.start(LEDStart,&queue); //} driver=new LEDDriver(&queue); flipper.attach(&flip, 0.002f); //LEDStart(&queue,&ticker); receive(&queue); }