![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
main.cpp@80:dbda5092950e, 2018-05-16 (annotated)
- Committer:
- albireo987
- Date:
- Wed May 16 11:15:25 2018 +0000
- Revision:
- 80:dbda5092950e
- Parent:
- 60:ef4592cf5397
- Child:
- 81:56e9873f29df
commentaar geschreven def
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KlaasGovaerts | 0:98e4994363bf | 1 | #include "mbed.h" |
KlaasGovaerts | 20:fe6a58e84929 | 2 | #include "rtos.h" |
KlaasGovaerts | 18:5ee34e60a31d | 3 | #include "Interpreter.h" |
KlaasGovaerts | 5:9903a0906a72 | 4 | #include "TCPlistener.h" |
KlaasGovaerts | 29:996da48a265c | 5 | #include "Receiver.h" |
albireo987 | 26:4c673da1a3ae | 6 | #include "LEDDriver.h" |
KlaasGovaerts | 29:996da48a265c | 7 | |
KlaasGovaerts | 59:237e32fd3555 | 8 | Ticker ledTicker; |
KlaasGovaerts | 51:b9da0ba69a29 | 9 | LEDDriver *driver; |
KlaasGovaerts | 49:2d592fa1cad5 | 10 | |
KlaasGovaerts | 30:915f6cb7ffa5 | 11 | void receive(Queue<int,8>* queue){ |
KlaasGovaerts | 29:996da48a265c | 12 | Receiver receiver(queue); |
KlaasGovaerts | 29:996da48a265c | 13 | receiver.start(); |
KlaasGovaerts | 29:996da48a265c | 14 | } |
KlaasGovaerts | 29:996da48a265c | 15 | |
KlaasGovaerts | 59:237e32fd3555 | 16 | void driveLeds() { |
KlaasGovaerts | 51:b9da0ba69a29 | 17 | driver->drive(8); |
KlaasGovaerts | 49:2d592fa1cad5 | 18 | } |
KlaasGovaerts | 49:2d592fa1cad5 | 19 | |
KlaasGovaerts | 2:1c9645acea2f | 20 | int main (void){ |
KlaasGovaerts | 30:915f6cb7ffa5 | 21 | Queue<int,8> queue; |
KlaasGovaerts | 51:b9da0ba69a29 | 22 | driver=new LEDDriver(&queue); |
albireo987 | 80:dbda5092950e | 23 | ledTicker.attach(&driveLeds, 0.0015f); |
KlaasGovaerts | 44:ffac07bff0d8 | 24 | receive(&queue); |
KlaasGovaerts | 3:0d013b7e4dea | 25 | } |