Skip to content

A programmable LED strip with animations from a Gemma M0 microcontroller and CircuitPython

Notifications You must be signed in to change notification settings

pearsonkyle/Animated-LED-Strip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Animated-LED-Strip

A Gemma M0 controls a 30 pixel LED strip with custom animations mapped to the analog input from a potentiometer

Supplies:

Light Modes

main.py comes with a few preprogrammed light modes that read voltages from the analog pin connected to potentiometer. For < 0.55 V, the full strip will light up with a rainbow cycle

When the voltage reads between ~0.55-1.6 V, the user will be able to control the position of a pulsing light blob

# create center point
pi = int(num_pixels*volts)

for j in range(num_pixels):
    if (j > pi-3) and (j < pi+3):
        pass
    else:
        y = sin( 6.28*abs(pi-j)/num_pixels - phase )
        if abs(y) > 0.2:
            pixels[j] = (0,0,0)

When the voltage reads between 1.6-3.2 V square waves of different frequencies block pixels out and propagate

for j in range(num_pixels):
    y = sin( 6.28*j/(num_pixels*volts) - phase )
    if abs(y) > 0.5:
        pixels[j] = (0,0,0)

At high frequencies you get some cool aliasing effects that make the light strip look random

About

A programmable LED strip with animations from a Gemma M0 microcontroller and CircuitPython

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages