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)
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)