Heres the code:
Code: Select all
import machine, neopixel
pin = machine.Pin(5)
np = neopixel.NeoPixel(pin, 8)
np[0] = (255, 0, 0) # set to red, full brightness
np[1] = (0, 128, 0) # set to green, half brightness
np[2] = (0, 0, 64)
np.write()
Code: Select all
from machine import Pin
from neopixel import NeoPixel
pin = Pin(5, Pin.OUT) # set GPIO0 to output to drive NeoPixels
np = NeoPixel(pin, 8) # create NeoPixel driver on GPIO0 for 8 pixels
np[0] = (255, 255, 255) # set the first pixel to white
np.write() # write data to all pixels
r, g, b = np[0] # get first pixel colour
i also tried other pins with no luck (not all pins but a couple)
can someone help me find the source of the problem here? My board is a Heltec WiFI Kit 32 and this is the pin diagram and this is the led board: CJMCU-2812-8