preLab 07 - FAR-Lab/Developing-and-Designing-Interactive-Devices GitHub Wiki
For this week's Lab 7 we'll be making our own Video Doorbells, like a DIY Ring.
Bring your whole kit, Pi and Arduino, to lab this Thursday.
In preparation for this week's lab, you'll build a small circuit with your Arduino and test it with some code. You don't need the Pi for this preLab.
Button Circuit
On your breadboard, make this basic button circuit connected to pin 2
of the Arduino. (The LED is built in on the board and connected to pin 13
.)
Remember that the orientation of the button matters. Of the four pins, the pairs of pins closest to each other are the two that get connected when you push the button. And in fact, each pin of the close pair is always connected to the corresponding pin of the other close pair. This diagram my help:
HelloYou
code
Upload the HelloYou
is Arduino code that communicates over Serial to a Raspberry Pi (or any computer with a serial interface), sending any button events out to the computer, and turning on or off the built-in LED in response to message events coming in.
Copy this HelloYou.ino sketch into a new Arduino window and upload it to your board. (The built-in LED marked L
should be off.)
Open the Serial Monitor in Arduino and observe what happens when you press the button in your circuit -- you should see a change!