demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Committer:
KlaasGovaerts
Date:
Tue May 15 16:53:09 2018 +0000
Revision:
71:5e8ba1357442
Parent:
63:ef4592cf5397
Werkt niet2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
KlaasGovaerts 0:98e4994363bf 1 #include "mbed.h"
KlaasGovaerts 21:fe6a58e84929 2 #include "rtos.h"
KlaasGovaerts 19:5ee34e60a31d 3 #include "Interpreter.h"
KlaasGovaerts 6:9903a0906a72 4 #include "TCPlistener.h"
KlaasGovaerts 30:996da48a265c 5 #include "Receiver.h"
albireo987 25:4c673da1a3ae 6 #include "LEDDriver.h"
KlaasGovaerts 30:996da48a265c 7
KlaasGovaerts 62:237e32fd3555 8 Ticker ledTicker;
KlaasGovaerts 53:b9da0ba69a29 9 LEDDriver *driver;
KlaasGovaerts 51:2d592fa1cad5 10
KlaasGovaerts 71:5e8ba1357442 11
KlaasGovaerts 71:5e8ba1357442 12 void receive(Queue<int,1>* queue){
KlaasGovaerts 30:996da48a265c 13 Receiver receiver(queue);
KlaasGovaerts 30:996da48a265c 14 receiver.start();
KlaasGovaerts 30:996da48a265c 15 }
KlaasGovaerts 30:996da48a265c 16
KlaasGovaerts 62:237e32fd3555 17 void driveLeds() {
KlaasGovaerts 53:b9da0ba69a29 18 driver->drive(8);
KlaasGovaerts 71:5e8ba1357442 19 //led2=!led2;
KlaasGovaerts 51:2d592fa1cad5 20 }
KlaasGovaerts 51:2d592fa1cad5 21
KlaasGovaerts 3:1c9645acea2f 22 int main (void){
KlaasGovaerts 71:5e8ba1357442 23 Queue<int,1> queue;
KlaasGovaerts 53:b9da0ba69a29 24 driver=new LEDDriver(&queue);
KlaasGovaerts 71:5e8ba1357442 25 ledTicker.attach(&driveLeds, 0.2f);
KlaasGovaerts 46:ffac07bff0d8 26 receive(&queue);
KlaasGovaerts 4:0d013b7e4dea 27 }