demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Committer:
albireo987
Date:
Wed May 09 15:31:45 2018 +0000
Revision:
65:7951d11432f8
Parent:
61:738f026cf667
Child:
68:df2d20effe00
Child:
70:939f51a1a223
merged

Who changed what in which revision?

UserRevisionLine numberNew contents of line
albireo987 2:36158325f7b0 1 #ifndef LEDDRIVER_H
albireo987 2:36158325f7b0 2 #define LEDDRIVER_H
albireo987 2:36158325f7b0 3
albireo987 2:36158325f7b0 4 #include "mbed.h"
albireo987 25:4c673da1a3ae 5 #include "rtos.h"
albireo987 2:36158325f7b0 6
albireo987 2:36158325f7b0 7 class LEDDriver
albireo987 2:36158325f7b0 8 {
albireo987 2:36158325f7b0 9 private:
albireo987 8:a987e04734dd 10
KlaasGovaerts 49:8fe84f455571 11 int messageList[8];
KlaasGovaerts 56:4274186bf584 12 int codedMessage0[25];
KlaasGovaerts 56:4274186bf584 13 int codedMessage1[25];
KlaasGovaerts 56:4274186bf584 14 int codedMessage2[25];
KlaasGovaerts 56:4274186bf584 15 int codedMessage3[25];
KlaasGovaerts 56:4274186bf584 16 int codedMessage4[25];
albireo987 9:c800045806f0 17 int directions[8];
albireo987 25:4c673da1a3ae 18 Queue<int,8>* queue;
KlaasGovaerts 50:c5cd73d93045 19 DigitalOut *leds[8];
KlaasGovaerts 47:2d877f01ca7b 20 int currentLocation;
albireo987 2:36158325f7b0 21
albireo987 25:4c673da1a3ae 22 /**prep for eventual multithreading
albireo987 25:4c673da1a3ae 23 *methode om nieuwe richtingen van de receiver klasse te ontvangen
albireo987 25:4c673da1a3ae 24 *@params aantal leds die een nieuw bericht moeten krijgen
albireo987 25:4c673da1a3ae 25 */
KlaasGovaerts 58:4e06cfb6d010 26 void poll(int numberOfLeds);
albireo987 38:47c075a354b5 27
albireo987 38:47c075a354b5 28 /**
albireo987 38:47c075a354b5 29 *callback methode voor de ticker
albireo987 38:47c075a354b5 30 *@params de led om aan te sturen
albireo987 38:47c075a354b5 31 */
albireo987 38:47c075a354b5 32 void sendData();
albireo987 2:36158325f7b0 33
KlaasGovaerts 47:2d877f01ca7b 34 void setLEDS(int j);
KlaasGovaerts 47:2d877f01ca7b 35
albireo987 10:7871aeacea08 36 public:
KlaasGovaerts 58:4e06cfb6d010 37
albireo987 10:7871aeacea08 38 /**
albireo987 10:7871aeacea08 39 *methode dat alle leds aanstuurt
albireo987 10:7871aeacea08 40 *@params aantal leds aan te sturen
albireo987 10:7871aeacea08 41 */
albireo987 2:36158325f7b0 42 void drive(int numberOfLeds);
albireo987 10:7871aeacea08 43
albireo987 10:7871aeacea08 44 /**
albireo987 10:7871aeacea08 45 *constructor voor een driver object
albireo987 32:537005b4a065 46 *@params de queue met de waarden die een richting aanduiden
albireo987 10:7871aeacea08 47 */
albireo987 25:4c673da1a3ae 48 LEDDriver(Queue<int,8>* queue);
KlaasGovaerts 46:ffac07bff0d8 49
KlaasGovaerts 61:738f026cf667 50 ~LEDDriver();
KlaasGovaerts 61:738f026cf667 51
KlaasGovaerts 46:ffac07bff0d8 52 void drive8leds();
albireo987 2:36158325f7b0 53
KlaasGovaerts 47:2d877f01ca7b 54 void initArrays();
KlaasGovaerts 47:2d877f01ca7b 55 };
albireo987 2:36158325f7b0 56
albireo987 2:36158325f7b0 57 #endif