How to use an LED strip with the Touch Board

Find out how to use an strip light with the Touch Board

The Touch Board’s capacitive sensors allow you to create all kind of touch and proximity switches. In this tutorial we show you how to use the Touch Board and Adafruit’s Neopixel flexible LED strip together and create a touch switch for the led strip light. Adafruit’s Neopixel silicone encased flexible LED strip lights aren’t the only ones available, but the one we test was the most accessible LED tape. You can buy the strip at different lengths, always in meter and either in black or white colour. In this tutorial, we use the Touch Board Pro Kit and make use of the Proto Shield to demonstrate an easy installation of the LED strip lighting.

This tutorial can also be adapted for the Interactive Wall Kit and create amazing interactive lighting installations, where the user interacts with the smart wall and plays with the light source.

Step 1 Assemble the NeoPixel strip

Adafruit’s Neopixel LED strip come in various sizes with a different amount of LEDs. Because they draw so much current, you need an external 5V power supply to power the strip. Don’t use a power source that provides more, if you use a power supply with a higher voltage, it will destroy the strip lighting. The amount of current you need depends on how many LEDs you use. Each LED or pixel draws 20mA, so if you use 10 LEDs, you need at least 0.2A and if you’re using 100 LEDs, you need a power source with 2A.

There are many power sources available. We’re using a power source of 5V and 2A with a 2.1mm tip connector, and use a 2.1mm jack to screw terminal block to connect the power cables of the tape light to the power supply. Also use a large capacitor of 1000 µF, 6.3V or higher between ground and 5V of the LED strip, connecting the anode to the ground of the power strip. Don’t connect the LED strip to power just yet.

The Neopixel LED strip comes with a 2 or 3 pin JST SM connector. To easily connect to the connector, we use JST SM receptacle cable.

Step 2 Connect everything together

In order to connect the Touch Board to the NeoPixel strip, follow this wiring diagram. You can either connect the LED strip and the Touch Board together via a breadboard or via the Proto Shield. You can leave the 5V connection that is part of the JST connection disconnected. In this example, we have just soldered it to a pin on the Proto Shield, where we can access it later if we need to.

Step 3 Upload the code on the Touch Board

If you haven’t set up your Touch Board, then check out the setup tutorial.

You can download our example code. This code will turn the LED strip on when you touch electrode 0.

Open it and find the variable NUMPIXELS. Change it to the number of pixels that you are using, in this example, we’re using 10. Install the Adafruit Neopixel library via

Sketch→Include Library→Manage Libraries…

Search for “neopixel” and click install. Once installed, upload the code to the Touch Board, making sure that you have selected the right settings for the Touch Board.

Step 4 Connect to power

Connect the power light strip to power and press electrode 0 of the Touch Board and watch the LED tape light up!

In the code we opted for a white light, but you can change the color temperature by playing around with the numbers inside setPixelColor.

Step 5 Next steps

Changing the code of the Touch Board also allows you to create a proximity switch for the LED light strip, where you can dimmer the lights by approaching the sensor. Adafruit’s Neopixel library allows you to easily change the color of each individual LED light, the brightness of each LED lighting or which LED is light up.

You can easily make the LED strip adhesive by applying silicone-friendly adhesive to it.

You can also use multiple LED strips, you just need to add enough power sources.

We’d love to see your creations and what you create with the Touch Board, so feel free to send us images or videos at info@bareconductive.com or via Instagram or Twitter.

Also, if you have any troubles, have a look at our Troubleshooting Guide, our FAQs or contact us at info@bareconductive.com.