Jump to main content

How to Use a Button with an Arduino (Lesson #5)

Learn how to use a button as a digital input to an Arduino I/O pin with the digitalRead command. See our complete playlist of Arduino tutorials here: https://youtube.com/playlist and the Science Buddies website for cool science projects you can do with an Arduino: https://www.sciencebuddies.org/search

0:00 intro
0:23 materials
0:37 algorithm: pseudocode
1:31 algorithm: flowchart
2:22 build the circuit
8:29 connect a pull-down resistor
9:54 write the code
13:59 test your code
14:19 reverse button behavior
16:18 variables
20:40 up next


Explore More Resources Like This

Area of Science
Robots are made to go and do what humans either can not, or do not want to do. They are used in hundreds of ways from exploring Mars, to working tirelessly on a manufacturing line, to providing companionship. Not to mention they make great movie characters! … Read more
Top
Free science fair projects.