Skip to content

Moving Rainbow Challenges

They are a set of learning challenges for the LED Strip. They are listed in order from the simplest to the most complex.

Beginning Challenges

These challenges can all be done once you know the following commands:

  1. Initialize the NeoPixel
  2. Change a Pixel Color
  3. Write the Strip
  4. For Loop and range
  5. Sleep

Draw an RGB Pattern

Draw a Rainbow

Make a Pixel Fade in and Out Slowly

Make a Heartbeat Pattern

Make a Pixel Move Down the Strip

Change Colors for the Entire LED Strip (wipe)

Move a Pixel Down and Back

Create a Larson Scanner Pattern

Draw Different Levels of Brightness

Make Every Other Pixel a Different Color

Intermediate Labs

These challenges involve more advanced programming such as using:

  1. Conditionals
  2. Modulo (remainder)
  3. Functions
  4. Multiple Loops
  5. Nested Loops
  6. Lists
  7. Random Numbers

Move the Rainbow Pattern

Move a Comet Pattern

Create a List of Named Colors

Create a Theater Chase Pattern

Use The Wheel Function to Draw a Rainbow

Do a Color Cycle for the Entire Strip

Draw Multiple Color Comets

Draw Different Patterns in a Loop

Use Random Numbers for Color Selection

Random Ripples

Draw random ripple patterns on the LED strips where the pixels move out from a single point.

Use Random to Simulate Candle Flicker

Use Random to For Changing Move Direction

Advanced Labs

These labs may require some additional components such as:

  1. Buttons (momentary press)
  2. Potentiometers
  3. Speaker/Buzzer
  4. Interrupt Service Routines
  5. A USB Current Meter
  6. A Light Sensor (photoresistor)
  7. An OLED display
  8. A Wireless Controller

Create Separate Python Functions for Five Patterns

Create a Mode Variable for Switching the Patterns

Use a Button to Change a Pattern Mode

Night Light

Add a photoresistor that will turn the LED strip on when it is dark in the room.

Use Potentiometers to Change Speed

Add a potentiometer and change the speed of a display pattern

Use Potentiometers to Change Brightness

Add a potentiometer and change the brightness of a display pattern

Create a Demo Auto-Cycle Pattern a Button to Advance the Mode

Calculate the Power Draw of Different Colors

Get a USB power meter from the instructor. Measure the current draw for each of the different colors. Calculate the time for a 2,500-milliamp-hour battery pack for various patterns.

Connect an OLED display that shows the pattern, color and brightness of the LED strip.

Add Buttons to Change the Parameters with the OLED

Add a Sound

Add a speaker or buzzer to play a sound when a button is pressed.

Simon Game

Display a pattern on four pixels of the LED strip and have the user repeat the pattern using four buttons. Play different tones for each pixel.

Zone Game

Draw a zone of a different color in the center of the strip. Move a pixel down and strip and give a player a point if they press the button in the strip. Use sound and pixel colors to show the points score. Make the zone smaller and the speed faster as the game progresses.

Random Zone

Add randomization to your Zone game to make the zone move in random directions.

Clock

Turn your LED strip into a clock. You can display each digit using a binary structure.

Wireless Labs

Web Page Color Control

Create a web page that changes the color of the LED strip.

Create a Web Page to Change the Pattern

Create a web page that changes the pattern

Pattern, Brightness and Speed

Create a web page that changes the pattern, brightness and speed of a pattern.

Display the Weather Forecast

Use a web service to get the weather forecast for the current day. Change the color of the display:

  1. Yellow for Sunny
  2. Gray for Cloudy
  3. Red for Rain
  4. White for Snow

You can use this example to get started.