![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
main.cpp
- Committer:
- KlaasGovaerts
- Date:
- 2018-04-18
- Revision:
- 19:4997b02d6a88
- Parent:
- 18:5ee34e60a31d
- Child:
- 20:fe6a58e84929
File content as of revision 19:4997b02d6a88:
#include "mbed.h" #include "Interpreter.h" #include "TCPlistener.h" int main (void){ int LED[12]; for(int i=0;i<12;i++){ LED[i]=-1; } Interpreter interpreter(LED); TCPlistener listener; char command[512]; listener.receiveSegment(command,sizeof(command)); interpreter.executeCommand(command); for(int i=0;i<8;i++){ printf("LED %i, oriëntatie: %i\r\n",i,LED[i]); } /* char command[512]; listener.receiveSegment(command,sizeof(command)); */ #if 0 Mutex* lock=new Mutex(); int LED[12]; for(int i=0;i<12;i++){ LED[i]=-1; } Receiver receiver(LED,lock); reciever.init(); #endif /* Thread receiverThread; receiverThread.start(receiver.run); */ //std::thread receiverThread(&Receiver::run, &receiver); /* Thread ledThread; receiverThread.start(Receiver); */ }