Zitat
Was müßte ich im Programm ändern, damit die RBG als LED 0 verbleiben kann und das Soundmodul mit seinem WS2811 als LED 1 fungiert? Irgendwo fehlt die Heartbeat Befehlszeile.
Hallo Martin,
bei den meisten MLL Makros definiert der erste Wert hinter der öffnenden Klammer die Led Nummer (LED,...).
Hier einige Beipiele
1
2
3
4
5
#define ConstRGB(LED,InCh, R0, G0, B0, R1, G1, B1)
#define RGB_Heartbeat(LED)
#define Sound_Seq1( LED, InCh) Sound_ADKey(LED, InCh, SOUND_ADKEY1, 0)
Hast du die Heartbeat Led bestückt ist die die erste in der Kette und bekommt Led Nummer 0, das direkt folgende Soundmodul somit Adresse 1.
Im erwähnten Beispiel musst du also die Led-Adresse des Soundmoduls von 0 auf 1 ändern, indem du bei allen Makros, die Led 0 verwenden, das erste Argument auf 1 änderst.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#else // JQ6500 sound module
// Unfortunately there are two different WS2811 modules
// Rename .. _JQ6500_ with _JQ6500_BG_ if the module with swapped Green/Blue LEDs is used
//
Sound_JQ6500_Seq1( 1, 0) // Play sound file 1 if the red button of DCC address 1 is pressed.
Sound_JQ6500_Seq2( 1, 1) // " " 2 green " " 1 "
Sound_JQ6500_Seq3( 1, 2) // " " 3 red " " 2 "
Sound_JQ6500_Seq4( 1, 3) // " " 4 green " " 2 "
Sound_JQ6500_Seq5( 1, 4) // " " 5 red " " 3 "
Sound_JQ6500_Prev( 1, 6) // Play the previous sound file the red button, addr 4 is pressed.
Sound_JQ6500_Next( 1, 7) // Play the next sound file if green button, addr 4 is pressed.
Sound_JQ6500_Next_of_N( 1, 8, 3) // Play the next sound file of N if the red button, addr 5 is pressed. The 5 defines the maximal played sound number in the range of 1..5.
Sound_JQ6500_PlayRandom(1, 9, 5) // Play a random sound file if the green button, addr 5 is pressed. The 14 defines the maximal played sound number in the range of 1..5.
Sound_JQ6500_DecVol( 1, 10, 1) // Decremet the volume if the red button, addr 6 is pressed.
Sound_JQ6500_IncVol( 1, 11, 1) // Increment the volume if the green button, addr 6 is pressed.
Andreaskreuz( 1,C2,SI_1) // Usage example of the remaining two outputs
#endif
Willst du noch einen Heartbeat haben, was nicht zwingend notwendig ist, dann fügst du die Zeile
im Konfigurationsblock, direkt vor dem EndCfg ein.
1
2
3
4
5
6
7
Andreaskreuz( 1,C2,SI_1) // Usage example of the remaining two outputs
#endif
RGB_Heartbeat(0) // Led 0 wird heartbeat led
EndCfg // End of the configuration
};
en: weitere Beschreibungen bezüglich der Makros und Programmierung findest du in der Doku MobaLedLib Ein kurzer Ueberblick.pdf
en:
Jürgen...