Discuss Scratch
- Discussion Forums
- » Connecting to the Physical World
- » LED Strip - can Scratch control a physical RGB LED Strip?
- DandMcoders
-
4 posts
LED Strip - can Scratch control a physical RGB LED Strip?
Would like to control an RGB LED strip. I have a Raspberry PI 4 and I am able to control single LEDs using the Raspberry PI Simple Electronics extension.
Can an RGB LED Strip (not just single LEDs), be controlled with Scratch?
Thank you.
Can an RGB LED Strip (not just single LEDs), be controlled with Scratch?
Thank you.
Last edited by DandMcoders (Aug. 22, 2024 02:59:10)
- BigNate469
-
1000+ posts
LED Strip - can Scratch control a physical RGB LED Strip?
While I can't test this right now (I'm about 70 miles away from my Raspberry Pi 5 right now
), I think you could manage it using the GPIO pins, but it depends more on the LED strip (and how it's designed, and what inputs it's willing to receive), but if you just start sending random signals to one via the GPIO pins you might get some interesting results that you could use.

- DandMcoders
-
4 posts
LED Strip - can Scratch control a physical RGB LED Strip?
Thx BigNate469. The LED strip requires 5v so I used 2 GPIO pins and it works, it lights up! and using Control code can be turned on and off, and blink. Challenge now is that the LED strip stays in one/same color. Would like to know if Scratch can change the color of the LED strip (ie to green, blue, orange, red, yellow, purple…). I see that with Python and other programing languages it can be done; can Scratch code be used to change the color of the LED strip?
Thanks for the responses.
Thanks for the responses.
- BigNate469
-
1000+ posts
LED Strip - can Scratch control a physical RGB LED Strip?
Hmm… Thx BigNate469. The LED strip requires 5v so I used 2 GPIO pins and it works, it lights up! and using Control code can be turned on and off, and blink. Challenge now is that the LED strip stays in one/same color. Would like to know if Scratch can change the color of the LED strip (ie to green, blue, orange, red, yellow, purple…). I see that with Python and other programing languages it can be done; can Scratch code be used to change the color of the LED strip?
Thanks for the responses.
If I had an LED strip on me right now I would test some things to see if this works…
Does the LED strip have a third or more wires connected to it? You might be able to use another wire to control its hue. Alternatively, try sending a higher voltage (not much higher, just a little) across one of them.
why are there forums that need bumping
- DandMcoders
-
4 posts
LED Strip - can Scratch control a physical RGB LED Strip?
Thx, I didn't get it to work as shown in videos using Python, but took your feedback and played around with the wires, was able to control the hue (ie turn the bright blue to sky blue). Thx again for the responses.
- Discussion Forums
- » Connecting to the Physical World
-
» LED Strip - can Scratch control a physical RGB LED Strip?