Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Inconsistent NeoPixel Jewel behavior on CircuitPlayground an
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Inconsistent NeoPixel Jewel behavior on CircuitPlayground an

by balesse on Thu Jun 18, 2020 11:53 am

Are the 7 pixel Jewels compatible with MakeCode? I can get the leds on the jewel to light up but behavior is odd. I'm rotating between Blue, White, Yellow, and Pink. The lights on the CircuitPlayground work fine, but on the Jewel, two of the pixels work fine, three of them change different colors, one of them flashes between green and off, and the last one never turns on. I've tried two different Jewels and neither of them works correctly.

Any ideas for me?
Here is my code:
Code: Select all | TOGGLE FULL SIZE
let strip = light.createStrip(pins.A1, 7)

forever(function () {
    light.setAll(0x0000ff)
    pause(1000)
    light.setAll(0xff9da5)
    pause(1000)
    light.setAll(0xff8000)
    pause(1000)
    light.setAll(0xff0080)
    pause(1000)
})

forever(function () {
    strip.setAll(0x0000ff)
    pause(1000)
    strip.setAll(0xff9da5)
    pause(1000)
    strip.setAll(0xff8000)
    pause(1000)
    strip.setAll(0xff0080)
    pause(1000)
})


Thanks in advance for the help!

balesse
 
Posts: 3
Joined: Tue Jun 09, 2020 11:11 pm

Re: Inconsistent NeoPixel Jewel behavior on CircuitPlaygroun

by adafruit_support_bill on Thu Jun 18, 2020 12:02 pm

Did you purchase the RGB or RGBW version of the jewels?

adafruit_support_bill
 
Posts: 77937
Joined: Sat Feb 07, 2009 10:11 am

Re: Inconsistent NeoPixel Jewel behavior on CircuitPlaygroun

by balesse on Thu Jun 18, 2020 12:05 pm

RGBW version. Do they operate differently? I thought it was just that the colors would be a bit different from the two.

balesse
 
Posts: 3
Joined: Tue Jun 09, 2020 11:11 pm

Re: Inconsistent NeoPixel Jewel behavior on CircuitPlaygroun

by adafruit_support_bill on Thu Jun 18, 2020 12:10 pm

The RGBW version has a 4th channel, so you need to send 4 bytes per pixel rather than 3. You need to specify this when you define the strip in your code. I'm not sure if MakeCode supports RGBW yet. I'll check with our MakeCode expert.

adafruit_support_bill
 
Posts: 77937
Joined: Sat Feb 07, 2009 10:11 am

Re: Inconsistent NeoPixel Jewel behavior on CircuitPlaygroun

by johnpark on Thu Jun 18, 2020 1:50 pm

Hi -- yes, you can use RGBW NeoPixels in MakeCode -- Head to Light > NeoPixel category of blocks and down at the very bottom there's a block called "set strip mode to RGB (GRB format)". Bring that into your start block and change the dropdown to RGB+W

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

Re: Inconsistent NeoPixel Jewel behavior on CircuitPlaygroun

by balesse on Thu Jun 18, 2020 3:25 pm

Yes, thanks, just found that as well. I just needed to set the newpixel mode.
Code: Select all | TOGGLE FULL SIZE
let strip = light.createStrip(pins.A1, 7, NeoPixelMode.RGBW)


It is working great now.

Thanks for the help!

balesse
 
Posts: 3
Joined: Tue Jun 09, 2020 11:11 pm

Please be positive and constructive with your questions and comments.