I’m trying to use the example code, but for the life of me, can’t get a response out of the shiftbrite. It’s getting power and I know it works b/c I tested it successfully with an Arduino. I’ll attach a pic and the code. Any thoughts?
1023 0 0 rgb 500 delay # red
0 1023 0 rgb 500 delay # green
0 0 1023 rgb 500 delay # blue
# Subroutine for setting the RGB value of a ShiftBrite/ShiftBar.
# example usage: 1023 511 255 rgb
0 send_bit # this bit does not matter
0 send_bit # the "address" bit - 0 means a color command
swap rot rot
0 1 8000 1 servo servo # toggle the latch pin
# sends a numerical value as a sequence of 10 bits
over over bitwise_and send_bit
# sends a single bit
if 8000 else 0 endif
2 servo # set DATA to 0 or 1
0 0 8000 0 servo servo # toggle CLOCK
I see that you have not connected the EI (enable) pin. It needs to be low for the ShiftBrite to do anything.
Bingo. For some reason, I thought it was optional. Thanks, I’m trying to learn bit banging techniques for some of the longer strings out there. I’m hoping to run a string of 4-10 programmable LEDs off of the maestro this way.
Question, could a single Mini Maestro run 4 programmable RGB LEDs through a rainbow of colors and simultaneously monitor 4 pushbuttons, alter (or “freeze”) the colors as the buttons are pressed? And then also throw a single servo in the mix as well? Or would I need two boards?
Great - I am glad that it works for you now.
I obviously have not tried that myself, but I bet a Mini Maestro will be able to handle all of that, but it will be quite a challenging programming task. This kind of thing is tricky, because even though it is natural to describe it as four things happening in parallel, you are going to have to reduce it to a sequential program. Please let me know how it goes, and feel free to ask if you need help along the way!