Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Rotate & shift in MakeCode for LED strips - do they work?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Rotate & shift in MakeCode for LED strips - do they work?

by RRWagner on Thu Feb 13, 2020 6:03 am

I am using the Neopixel extension in MakeCode, and most blocks work, but Rotate and Shift have no effect on LEDs that are already turned on. I have the strip length defined at 48 pixels, although it is physically longer.

Are there any special tips for successfully using the rotate and shift blocks in MakeCode?

RRWagner
 
Posts: 5
Joined: Sat Jul 02, 2011 9:38 pm

Re: Rotate & shift in MakeCode for LED strips - do they work

by johnpark on Thu Feb 13, 2020 1:40 pm

Does this example work for you? https://makecode.com/_Wsf8hsCczgHh
Code: Select all | TOGGLE FULL SIZE
let strip = light.onboardStrip()
strip.setPixelColor(0, 0x00ffff)
strip.setPixelColor(1, 0xff0000)
forever(function () {
    strip.move(LightMove.Rotate, 1)
    pause(100)
})

johnpark
 
Posts: 767
Joined: Wed Mar 25, 2009 2:15 pm

Please be positive and constructive with your questions and comments.