Follow

Powering LED's with the Touch Board

If you download the latest installer and run it, you'll see an example labelled touch_mp3_with_leds in the Touch Board Examples folder. This sets up 12 pins (detailed in the code) as digital outputs, and keeps those pins high while the track associated with that electrode is playing. 

Electrode E5 is linked to digital pin 13, which is connected to the onboard LED, so you can easily see the code's behaviour by uploading the code with a microSD card filled with tracks appropriately named for Touch_MP3 and observing the onboard L LED.

With this code, you can run one normal LED per pin, by connecting the anode (positive leg) of the LED to the appropriate output pin and the cathode (negative leg) to ground. If you want to run many LEDs from a pin you'll have to use a transistor driver circuit - you can learn more about them here.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments