I've connected two rgb strips(WS2812B) to raspberry pi. Each strip consists of 60 LEDs. The first strip data line is connected to GPIO pin number 18 & Second strip data line is connected to GPIO pin number 12. I'm using strandtest.py to control my strip. Initially I've used 12 as my pin number in the code then the second strip glows up. But Now if I use 18 as my pin number in the code then both of the strips starts to glow. How to control single strip at once?
Asked
Active
Viewed 751 times
1 Answers
1
Now I've connected both the strips in series. This code worked for me:
import board
import neopixel
pixels = neopixel.NeoPixel(board.D18,120)
for i in range(0,119):
if i<=59:
pixels[i] = (0,255,0)
else:
pixels[i] = (255,0,0)
pixels.show()
Bharath Pabba
- 131
- 2