Coder Social home page Coder Social logo

touch_mp3_with_leds's Introduction

Bare Conductive

Bare Conductive Touch MP3 and LED Demo Code

Touch-to-MP3 code including a separate pin for each electrode / track which goes high while that track is playing. That pin can be used to drive a LED by connecting the anode (positive leg of the LED) to the relevant pin and the cathode (negative leg) to ground. A larger load (LED strip, motor etc.) can be driven with an appropriate transistor driver circuit.

Written for the Bare Conductive Touch Board.

The mapping between electrodes and the pins which go high in response is:

  • E0 - D0
  • E1 - D1
  • E2 - D10
  • E3 - D11
  • E4 - D12
  • E5 - D13 (which has an onboard LED connected to it)
  • E6 - A0 (analogue inputs can be used as digital outputs too)
  • E7 - A1
  • E8 - A2
  • E9 - A3
  • E10 - A4
  • E11 - A5

You need twelve MP3 files named TRACK000.mp3 to TRACK011.mp3 in the root of the microSD card.

When you touch electrode E0, TRACK000.mp3 will play. When you touch electrode E1, TRACK001.mp3 will play, and so on.

SD card    
โ”‚
  TRACK000.mp3  
  TRACK001.mp3  
  TRACK002.mp3  
  TRACK003.mp3  
  TRACK004.mp3  
  TRACK005.mp3  
  TRACK006.mp3  
  TRACK007.mp3  
  TRACK008.mp3  
  TRACK009.mp3  
  TRACK010.mp3  
  TRACK011.mp3  

Requirements

Install

  1. Close the Arduino IDE if you have it open.

  2. Download the .zip or clone the repository to your local machine - if downloading the .zip, extract the contents somewhere that suits you.

  3. Take the touch_mp3_with_leds folder and move it to Arduino Sketchbook Folder. This will be different for each operating system:

    Windows

    Libraries\Documents\Arduino

    or

    My Documents\Arduino

    Mac

    Documents/Arduino

    Linux (Ubuntu)

    Home/Arduino

    If this folder does not exist, create it first.

  4. Reopen the Arduino IDE - you should now be able to open the sketch in the File -> Sketchbook menu.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.