Project Two – Digital Input
The purpose of this project is to demonstrate two forms of digital input – using the button and the tilt switch . Pressing either of the buttons will light the respective LED, and activating the tilt-switch will light both LEDs.
Now upload the following Arduino sketch:
- Connect the LED to the D1/D2 Digital I/O jack, like it was in Projects 1 and 2.
- Arduino Pin D1 powers the Red LED on the Grove's D1 connector, and Arduino Pin D2 powers the Green LED on the Grove's D2 connector.
- Connect the Tilt Switch to the D5/D6 Digital I/O jack.
- The Tilt Switch Grove's D1 connector sends a high or low signal to the Arduino's D5 digital input.
- Connect the Twin Button Grove to the D7/D8 input jack (on the second row.)
- The Twin Button Grove's red button uses the D1 connector to send a signal to the Arduino's D7 digital input, and the green button uses the D2 connector to send a signal to the Arduino's D8 digital input.
// Project Two - Digital Inputs
Copyright (c) 2008-2016 Seeed Development Limited (www.seeedstudio.com
This static html page was created from http://www.seeedstudio.com/wiki