Photography lighting is a tricky business. This project aims to create an easy add-on that can work with any camera, film or digital, to illuminate subjects and scenes with custom colors. 

To add an extra fun element to this ring light, we can select the color by turning a color wheel, the color that is above the light sensor on the CircuitPlayground will be the color displayed!

This project is a fun introduction to soldering and coding, and is easy to adapt for different lighting purposes.

The Electronics

Circuit Playground Express is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and...
In Stock
What is better than smart RGB LEDs? Smart RGB+White LEDs! These NeoPixel rings now have 4 LEDs in them (red, green, blue and white) for excellent lighting effects. Round and...
Out of Stock
By popular request - we now have a way you can turn on-and-off Lithium Polymer batteries without unplugging them.This PH2 Female/Male JST 2-pin Extension...
Out of Stock
This Swivel-Head Pan-Tilt (PTZ) Shoe Mount Adapter allows you to attach something with standard 1/4" machine screw mount to a camera's shoe...
In Stock
1 x Female/Female Jumper Wires
Premium 20 x 3" (75mm)
1 x 10K potentiometer
Panel Mount (Breadboard Friendly)
1 x Potentiometer Knob
Soft Touch T18 - White


In addition to the electronics, for this project you will also need:

Solder Time

This step involves a bit of soldering. You'll need to connect three jumper wires to the NeoPixel ring, one to PWR, one to GND, and one to IN

NeoPixel Ring


Solder jumper wires to the NeoPixel ring.


Using pliers to give the end of the wire a slight bend makes it easier to solder it into place.


Connect jumper wires to the legs of the potentiometer. 

On these types of potentiometers the leg on the left is ground, the middle leg is the signal output, and the rightmost leg connects to power.

Complete Circuit

Use jumper wires to connect the potentiometer and NeoPixel ring to the alligator clips connected to Circuit Playground Express. 

Getting Familiar

Microsoft MakeCode for Adafruit is a web-based code editor that provides a block editor, similar to Scratch or, and also a JavaScript editor for more advanced users.

If you'd like to learn more about MakeCode, this guide is a good place to start.

MakeCode is fun to work with and easy to customize, allowing you to get some great results with just a little trial-and-error. 

How to Upload Code

To upload code, follow these instructions:

1) Connect your Circuit Playground Express to your computer using a micro USB cable and press the small reset button in the center of the board. All the LEDs will flash red briefly, then turn green. Your computer should now show a removable drive called CPLAYBOOT. 

2) Click the Download button in the code window below to download the .UF2 file to your computer.

3) Now drag and drop the .UF2 file onto the CPLAYBOOT drive in your computer's file explorer or finder.

The drive will automatically eject itself (your computer may give you a "failed to eject drive correctly" error, you can ignore this). The code is now on your Circuit Playground Express and ready to run!

How it Works

The code for this project uses a bit of logic to create two modes for the NeoPixel ring based on the position of the slide switch. In the first section of the blue if statement we can see that if switch right then the brightness should be turned all the way up and the NeoPixel strip set to match the color detected by the light sensor onboard Circuit Playground Express.

In the second part of the blue if statement, the else if not switch right command tells Circuit Playground Express to follow the contained instructions only if the slide switch is moved to the left (i.e. not right) position. A new variable, "value", is created to measure the analog value of the potentiometer connected to pin A2, which can then be used  to control the brightness of the NeoPixel ring, using the strip set brightness value block. 

For more information on using potentiometers take a look at this guide.

Test It!

With the switch in the right position, you should be able to hold up different colors to the light sensor and watch how the NeoPixels react as CPX attempts to detect and match the color as best it can. 

Editing the Code

If you'd like to play with this code, click "Edit" in MakeCode and a new window will open in which you can create your own version.

To reveal the NEOPIXEL section in MakeCode, first click on LIGHT

Check Your Format

For this project we are using RGB+W pixels. Depending on what kind of NeoPixels you're using you may need to edit the format in the on start block to get the colors to display correctly. 

Download and print out the PDF of this color wheel below. 

Cut out both color wheels. 

This mirrored image of a color wheel will match when glued together, making it easy to see which color you're selecting. 

Glue to either side of a disk. Be sure to match them up!

Trim any excess around the edge.

Mark spots where holes will be needed. Widen the holes with a small screw driver or pen.


Attach Circuit Playground Express to the cardboard base using screws and/or standoffs.


Attach color wheel so that it sits over the color sensor on CPX.

Color Test

Try it out! Connect the Circuit Playground Express to a power source and ensure its slide switch is switched right. Slowly spin the color wheel and watch the colors change!



Connect potentiometer to jumper wires.

Press fit potentiometer through hole in cardboard. Use knob to hold potentiometer securely in place. 

Completed Control Unit

Shoe Mount Adapter


Screw your shoe mount adapter to the bottom of the cardboard platform.

This will allow you to connect it to your camera and position it for ease of use and comfort. 

Power Switch


Use twist ties to hold the switch, battery, and excess cable all together in a tidy package. This will make it easy to attach to the side of the camera. 

Use It!

Use double sided tape to connect the ring and power switch where you want them on your camera.

With the slide switch flipped to the left, you will find yourself in luminous mode, with the brightness of the NeoPixel ring controlled by the potentiometer.

When the switch is flipped to the right you're in color mode, able to switch between colors by rotating the color wheel. 

This guide was first published on Apr 24, 2019. It was last updated on Apr 24, 2019.