LED with a push button

It is very common to find buttons on every device all around us, be it a simple kitchen timer or a complicated microwave oven. Buttons provide users the ability to push them in order to instruct the device to do certain operations.

There are many types of buttons available on the market depending upon the usage scenarios. We will use a simple push button for the purpose of learning the fundamentals of wiring a button to a micro-controller and then receiving its input and thereafter triggering a piece of code to make a physical device do something. A typical push button is shown in the following figure for reference.

As shown in the next figure, a simple push button can be easily connected to the Arduino board by following ...

Get Learn Arduino Prototyping in 10 days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.