I was playing with the idea to install some nice LED strips in my home. But, after running the code, the LEDs would keep the last color they were given. So I set the color to RGB(0,0,0) in order to turn them off. My question is: Are they now turned off? Or, are they still using electricity?
And what is the right way to do it?
I'm running the code on my Raspberry Pi and I am using Python.
My code:
import board
import time
import neopixel
# Choose an open pin connected to the Data In of the NeoPixel strip.
pixel_pin = board.D18
# Choose the number of NeoPixels.
num_pixels = 2
# Choose the order of the pixel colors - RGB or GRB.
ORDER = neopixel.RGB
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.0, auto_write=False, pixel_order=ORDER)
# Show red.
pixels.fill((255,0,0))
pixels.show()
time.sleep(2)
# Turn them off.
pixels.fill((0,0,0))
pixels.show()