Hi,
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?
Tyler
begin
1023 0 0 rgb 500 delay # red
0 1023 0 rgb 500 delay # green
0 0 1023 rgb 500 delay # blue
repeat
# Subroutine for setting the RGB value of a ShiftBrite/ShiftBar.
# example usage: 1023 511 255 rgb
sub rgb
0 send_bit # this bit does not matter
0 send_bit # the "address" bit - 0 means a color command
swap rot rot
send_10_bit_value
send_10_bit_value
send_10_bit_value
0 1 8000 1 servo servo # toggle the latch pin
return
# sends a numerical value as a sequence of 10 bits
sub send_10_bit_value
512
begin
dup
while
over over bitwise_and send_bit
1 shift_right
repeat
drop drop
return
# sends a single bit
sub send_bit
if 8000 else 0 endif
2 servo # set DATA to 0 or 1
0 0 8000 0 servo servo # toggle CLOCK
return