Discuss Scratch

DandMcoders
New Scratcher
3 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.

Last edited by DandMcoders (Aug. 22, 2024 02:59:10)

BigNate469
Scratcher
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.

This signature is designed to be as useful as possible.
How to make a signature & other useful info about them
The Official List of Rejected Suggestions (TOLORS)
The Announcements Directory
Lesser-known Scratch URLs: https://scratch-mit-edu.ezproxy.canberra.edu.au/discuss/topic/542480/
Why @Paddle2See's responses are so often identical: https://scratch-mit-edu.ezproxy.canberra.edu.au/discuss/topic/762351/

Ads Useful projects:
Raycaster & Maze 1.4.1 | Don't Break The Ice | Procedurally Generated Terrain | Basic Trigonometry | Comparing the fastest list sorters on Scratch

“if nobody can learn the programming language, it's just gibberish that does math.” -me, in a forum post

The original name of “loves” was “love-its”. Technically speaking, this hasn't changed.

© @BigNate469, some rights reserved
DandMcoders
New Scratcher
3 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.
BigNate469
Scratcher
1000+ posts

LED Strip - can Scratch control a physical RGB LED Strip?

DandMcoders wrote:

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.
Hmm…
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

This signature is designed to be as useful as possible.
How to make a signature & other useful info about them
The Official List of Rejected Suggestions (TOLORS)
The Announcements Directory
Lesser-known Scratch URLs: https://scratch-mit-edu.ezproxy.canberra.edu.au/discuss/topic/542480/
Why @Paddle2See's responses are so often identical: https://scratch-mit-edu.ezproxy.canberra.edu.au/discuss/topic/762351/

Ads Useful projects:
Raycaster & Maze 1.4.1 | Don't Break The Ice | Procedurally Generated Terrain | Basic Trigonometry | Comparing the fastest list sorters on Scratch

“if nobody can learn the programming language, it's just gibberish that does math.” -me, in a forum post

The original name of “loves” was “love-its”. Technically speaking, this hasn't changed.

© @BigNate469, some rights reserved

Powered by DjangoBB