Tessel listens for a clap, then toggles a relay to turn something on and off.
(Also view this project/get the code easily at the Tessel projects page)
- Clone this repo
- npm install
- Connect lights to Relay Module in Relay port 1
- Plug in modules to Tessel: Relay in port A; Ambient in port B
- Plug in tessel via USB
- Plug in power to lights/relay
- Run "tessel run index.js" from this folder in your terminal
- Clap! Watch the lights turn on and off.
See it work:
Step 1: Plug in wires to Relay module
A relay acts as a switch– either connecting ('on') or not connecting ('off') the two wires fed into the channel.
Use a pen or a nail to press down on the top of the relay, and feed in the red (power) wire.
The ground wire doesn't go into the relay; it just goes straight to the power adapter.
Step 3: Plug in Tessel to USB
Plug in the Tessel to your computer. This provides power and lets you push code.