RGB LED Kit for Tiny FX Tutorial?

Is there a tutorial for using the RGB LED Kit for Tiny FX?

We do not currently have a learn guide for how to use the RGB LED Kit for Tiny FX.

Is there an example of how to get it to display a specific color?

I admit it’s not obviously named, but this example sets a specific colour: picofx/examples/tiny_fx/examples/function/read_button.py at main · pimoroni/picofx · GitHub

One of the showcase examples sets the RGB LED to a specific colour (ship_thrusters.py) but this is even less obvious. Here is an absolute minimal example I’ve just whipped up:

from tiny_fx import TinyFX
from picofx import ColourPlayer
from picofx.colour import RGBFX


# Variables
tiny = TinyFX()                         # Create a new TinyFX object
player = ColourPlayer(tiny.rgb)     # Create a new effect player to control TinyFX's RGB output

# Set up the colour effect to play
player.effects = RGBFX(255, 0, 0)

# Wrap the code in a try block, to catch any exceptions (including KeyboardInterrupt)
try:
    player.start()   # Start the effects running

    # Loop until the effect stops or the "Boot" button is pressed
    while player.is_running() and not tiny.boot_pressed():
        pass

# Stop any running effects and turn off all the outputs
finally:
    player.stop()
    tiny.shutdown()

It’s untested but if it works I will add it to the picofx github.

1 Like