LED Strip WS2812B Issue with Arduino MEGA
Hi all,
I have an Arduino Mega, and I want to make a 2812B LED strip work. Right now, I'm just trying to figure out if my strip is functioning correctly. I simply want to display a solid color, for example, "green," on my LED strip.
I've placed the program below to display 300 LEDs in green on pin 2 of the Arduino. What happens is that with each program upload, around ten LEDs always display in white at the beginning of the strip, and the rest of the LEDs in green. Afterward, if I re-upload the same identical program, the LEDs turn red or some other color, and this happens every time I re-upload. Sometimes, random colors appear as well.
For now, I've only connected the + and - (5V) and the control wire to pin 2. I don't yet know what the other two wires are for.
Have you ever encountered this issue? I want to know if it's a problem with my LED strip or my program.
I have an external power supply: 220V ==> 5V / 20A / 200W and another backup supply of 220V ==> 5V / 10A / 50W.
I have an Arduino Mega, and I want to make a 2812B LED strip work. Right now, I'm just trying to figure out if my strip is functioning correctly. I simply want to display a solid color, for example, "green," on my LED strip.
I've placed the program below to display 300 LEDs in green on pin 2 of the Arduino. What happens is that with each program upload, around ten LEDs always display in white at the beginning of the strip, and the rest of the LEDs in green. Afterward, if I re-upload the same identical program, the LEDs turn red or some other color, and this happens every time I re-upload. Sometimes, random colors appear as well.
For now, I've only connected the + and - (5V) and the control wire to pin 2. I don't yet know what the other two wires are for.
Have you ever encountered this issue? I want to know if it's a problem with my LED strip or my program.
I have an external power supply: 220V ==> 5V / 20A / 200W and another backup supply of 220V ==> 5V / 10A / 50W.