For common anode, wire the anode to +5V or your supply voltage (possibly through a resistor) and connect your cathodes to DOUT pins. If the light output is different for each die, you may want three resistors on the cathode side instead. E.g. red has a lower Vf, so may end up brighter, often green is too bright etc., so control the current with the resistors.
595s can sink current, meaning they “can provide ground/0V.” So the output is “inverted” for common anode parts. This can be specified in MB_NG. When the 595 output is high, the LED is off. When it’s low, the LED is on.
You shouldn’t need any transistors if the current is nominally around 20mA or so.
I haven’t tried with the dim levels of normal RGB LEDs, but TK. has in your second link above.
the RGB button has internal resistors, so i think it’s not necessary to match the color brightness…
Perfect, even easier then! Good choice on the buttons.
6 hours ago, roberto said:
now i have to figure out how to assign the RGB LEDs to different velocities on the same note… phew, this coding is a big book to get into it…
It does take a while to understand the coding, but just go through the many examples. Notice in the “RGB hue sweep” thread, TK. has basically what you need. He uses a map to define the LED colour based on an incoming CC, so change that to notes over the range you require. The velocity should change the dim level, at least this is one way to work with “smart” LEDs.
yes, those are nice buttons, rugged, but 10 bucks each…
well, before fiddling with RGB hue, i have to solve following
by inverting i turn off the RGBLEDs on startup:
# Common Anode RGB LEDs EVENT\_LED id=1 inverted=1 type=NoteOn key=36 # Red LED EVENT\_LED id=2 inverted=1 type=NoteOn key=37 # Green LED EVENT\_LED id=3 inverted=1 type=NoteOn key=38 # Blue Led
by sending a NoteOn 36/37/38 and Off from the MIOS Keyboard i can light and turn off the 3 LEDs. Fine.
Now, when i define a button the behaviour is reversed
…just for the record. im slowly slowly get into the deep sea of MIOS…
i managed to map the RGB buttons with the multicolour test mentioned in TK’s post above. everything’s fine… (although magenta is missing in the map, i added it at the end after red…)