pxt-neopixel icon indicating copy to clipboard operation
pxt-neopixel copied to clipboard

In RGB+W Mode, showColour() lights an extra LED, and clear() ignores it.

Open nbogie opened this issue 7 years ago • 0 comments

Simplest repeatable failing test: https://makecode.microbit.org/_YmYf9i6AzAxA

Note: This behaviour isn't visible in the simulator (perhaps because the simulator is only showing the number of LEDs configured by the create() call). In the real world this would only be noticed if neopixel.create() was called with a lower number of pixels than actually contained on the physical strip.

let lightStrip: neopixel.Strip = null
lightStrip = neopixel.create(DigitalPin.P0, 3, NeoPixelMode.RGBW)
basic.pause(1000)
lightStrip.showColor(neopixel.colors(NeoPixelColors.Red))
basic.pause(1000)
lightStrip.clear()
lightStrip.show()

Expected Behaviour (on real strip): Should see pixels 0,1,2 all red, only

Actual Behaviour (on real strip): As expected except pixel 3 is lit green and stays on after the clear()

rgbw extra unclearable pixel issue

Notes: I've tested with various configured lengths, whether 3, 15, or 60 pixels, the library call will always light this extra (last + 1) LED green. This discounts the possibility that the issue is simply a bad pixel in my hardware.

nbogie avatar Jun 10 '18 08:06 nbogie