Skip to content

Calling neopixels show() clear() show() too quickly hangs V2 #27

Closed
@martinwork

Description

@martinwork

The following code seems OK on V1, but hangs V2. Inserting sleeps makes it work

#without the sleeps this hangs on V2
#no need to connect neopixels

from microbit import *
import neopixel

display.show("S")

np = neopixel.NeoPixel(pin0, 5)
np[0] = (32, 0, 0)
np.show()
#sleep(100)
np.clear()
#sleep(100)
np[1] = (0, 32, 0)
np.show()

while True:
    display.show("W")
    sleep(1000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions