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:
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.