Author Topic: Feather M4 Express + PropMaker Wings + WS2812b LED  (Read 114 times)

0 Members and 1 Guest are viewing this topic.

Offline Daniel_FdrvcTopic starter

  • Newbie
  • Posts: 1
  • Country: lt
Feather M4 Express + PropMaker Wings + WS2812b LED
« on: March 24, 2024, 04:29:19 pm »
Guys, i need help. Im new to electronics and do everything how i find on youtube/google. What im doing wrong that my simple 4 led strip (non neopixel) dont whant to light up. I asked ChatGPT to write simple python code to light up all led when controler is turned on:

Code: [Select]
Code:
import board
import neopixel

# Define the pin for the data line
led_data_pin = board.D5

# Number of LEDs in the strip
num_leds = 4

# Create NeoPixel object
pixels = neopixel.NeoPixel(led_data_pin, num_leds)

# Function to turn on all LEDs with a specific color
def turn_on_all_leds(color):
    pixels.fill(color)

# Example usage:
# Turn on all LEDs with white color when the microcontroller starts
turn_on_all_leds((255, 255, 255))

But nothing happened. I checked the connection of the red (5 V) and black (gnd) wires to a simple LED lamp and it works. I think something is wrong with the yellow (din) connector, but I don't know what and how to check. Or maybe everything is wrong. I loaded the neopixel library into the controller and tried many different solutions. Nothing has helped me, but I don't want to give up. I hope for your help. I have attached pictures of my newbie wiring.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf