![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
Diff: main.cpp
- Revision:
- 26:4c673da1a3ae
- Parent:
- 20:fe6a58e84929
- Child:
- 27:29948b116e82
--- a/main.cpp Wed Apr 25 09:14:53 2018 +0000 +++ b/main.cpp Wed Apr 25 13:17:55 2018 +0000 @@ -2,22 +2,32 @@ #include "rtos.h" #include "Interpreter.h" #include "TCPlistener.h" +#include "LEDDriver.h" int main (void){ - int LED[8]; - for(int i=0;i<8;i++){ - LED[i]=-1; - } - Interpreter interpreter(LED); - TCPlistener listener; - char command[512]; + Queue<int,8> queue; + int a=1; + int b=2; + int c=3; + int d=4; + queue.put(&(a)); + queue.put(&(b)); + queue.put(&(c)); + queue.put(&(d)); + queue.put(&(d)); + queue.put(&(d)); + queue.put(&(d)); + queue.put(&(d)); + + + // Interpreter interpreter(LED); + // TCPlistener listener; + // char command[512]; while(true){ - listener.receiveSegment(command,sizeof(command)); - interpreter.executeCommand(command); - - for(int i=0;i<8;i++){ - printf("LED %i, richting: %i\r\n",i,LED[i]); - } + // listener.receiveSegment(command,sizeof(command)); + // interpreter.executeCommand(command); + LEDDriver driver = LEDDriver(&queue); + driver.run(8); } }