Hallo Leute,
ich habe mir, in Anlehnung, zum "Word-Clock" Projekt hier im FOrum das
STM32F4 Board geholt. Um nun die LEDs zum leuchten zu bringen benutze
ich die Cylon library...
Ich bekomme die LEDS zum leuchten und kann die Farbe eintellen und im
Beispiel Programm auch das springen der LEDS.
ich bekomme irgendwie noch nicht nur die LED nummero X ans leuchten.
Was mache ich?
1 | int main ()
|
2 | {
|
3 |
|
4 | // set up the lights.
|
5 | lines[0].start = 0;
|
6 | lines[0].speed = 1.6;
|
7 | lines[0].length = 30;
|
8 | lines[0].backgroundRatio = 40;
|
9 | lines[0].colour.R = 200;
|
10 | lines[0].colour.G = 0;
|
11 | lines[0].colour.B = 0;
|
12 | lines[0].dir = true;
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | // add the initial lines
|
18 | // give the LED driver the buffer to use.
|
19 | ledDriver.setData(pixelData, chainLen);
|
20 |
|
21 | //LEDs = 1;
|
22 |
|
23 | updateRateTimer.start();
|
24 | while (true) {
|
25 | ledDriver.sendData(); // send the LED data
|
26 |
|
27 | led1 = !led1;
|
28 |
|
29 | // wait for the next update time.
|
30 | while (updateRateTimer.read_ms() < updatePeriodMS) {
|
31 | }
|
32 | updateRateTimer.reset();
|
33 | }
|
34 |
|
35 | }
|
Ich setze die Daten mit setData und sende die dann in main, aber wieso
funktioniert das trotzdem noch nicht ?