Introduction: Touch Board and LEDs
LEDs are really useful for any technical project, so we have created this tutorial to explain how to connect LEDs to the Touch Board. We are using a 270Ω resistor; you can use other resistors but they should be in the 220Ω – 470Ω range. We recommend soldering headers to the Touch Board as it is more secure, but this is not absolutely essential; you can insert the jumper wires directly into the Touch Board’s pins.
Step 1: Materials
Step 2: Set-up the Touch Board
If you haven’t set up the Touch Board yet, please do so now by following this tutorial.
We are going to use the “touch_mp3_with_leds.ino” sketch. Select the sketch from the Sketchbook and hit upload.
Step 3: Solder Headers
This next step is optional – soldering the headers onto the Touch Board. If you haven’t soldered headers before, we recommend reading the articles from Sparkfun here . Alternatively, you can insert the jumper wires directly into the Touch Board’s pins.
Step 4: Connect LED and Resistor to Breadboard
Now it is time to work on the breadboard. First, insert your 270Ω resistor between two numbered rows. Then have a look at your LED. You can see that one leg is longer than the other. This is the positive leg and you need to stick it in the same row as one end of the resistor. The shorter leg, which is the negative leg, should be inserted into the row marked with the – sign.
Connect one end of the red jumper wire to the free end of the resistor and one end of the blue jumper wire to the row marked with a -. Your breadboard should look similar to the images on the right.
Step 5: Connect Touch Board to Breadboard
When you are done with the breadboard, connect the blue jumper wire to GND pin on the Touch Board and the red jumper wire to pin A5. It should look like the image on the right: pin A5 is connected to the resistor and the GND pin to the LED.
Step 6: Turn It on and Touch the Electrode
Connect the board to power and touch electrode 11. It should now light up your LED! And that’s how easy it is to light up an LED with the Touch Board.
Have a closer look at line 97 in the “touch_mp3_with_leds” code. All the pins in this array, so 0, 1 10, 11, etc., are the pins that have been mapped to the electrodes. In this example, we connected an LED to A5 and turned it on with electrode E11, but you can also connect an LED to pin 0 and turn it on with electrode E0. You can also connect more than one LED as we did in the image on the right. We would love to hear your ideas, so please share your creations with us by sending us your images or videos on Instagram or Twitter or emailing us at firstname.lastname@example.org.