Page 1 of 1

problem with w2812b

Posted: Wed Aug 31, 2022 2:01 pm
by Spikey1973
Hello to all,

after some small arduino projects, i am trying to do a larger project using a wemos esp32-s2 board. (aliexpress) using the micropython based circuit python.

to build the code step by step i started working on the basic outline of the code (non-finctional) and made a prototiype kindof setup where i can still disconnect my esp32 board but can use the tiny bits of code one at a time. unofrtunately the particular leds i am using have no prints on it. as all / most strips like this have a pinout of GND / DIN / VCC, i connected it this way too.

when i place my esp32 board on the prototype setup all 3 leds are white.. (is this normal)

unfortunately i can not get the most basic of codes (picked from adfruit circuitpython page, see below) , ofcouse i have the proper libraries on my board. I also checked out the naming of the pin number by these codes.

Code: Select all

import board
dir(board)

Code: Select all

import microcontroller
import board

board_pins = []
for pin in dir(microcontroller.pin):
    if isinstance(getattr(microcontroller.pin, pin), microcontroller.Pin):
        pins = []
        for alias in dir(board):
            if getattr(board, alias) is getattr(microcontroller.pin, pin):
                pins.append("board.{}".format(alias))
        if len(pins) > 0:
            board_pins.append(" ".join(pins))
for pins in sorted(board_pins):
    print(pins)
unfortunately i have no clue what to check look for, any thoughts on the issue would be much appreciated.

code:

Code: Select all

import board
import time
import neopixel

led = neopixel.NeoPixel(board.IO38, 3, brightness=0.2)

while True:
    led[0] = (255, 0, 0)
    time.sleep(0.5)
    led[1] = (0, 255, 0)
    time.sleep(0.5)
    led[2] = (0, 0, 255)
    time.sleep(0.5)

Re: problem with w2812b

Posted: Wed Aug 31, 2022 4:45 pm
by scruss
Spikey1973 wrote:
Wed Aug 31, 2022 2:01 pm
... the micropython based circuit python.
It's probably best to ask on Adafruit's CircuitPython support forum, as the syntax and libraries are somewhat different to regular MicroPython.

Also, this forum is going away soon, so not many people are looking at it