Arduino - Button Count - LCD
In this tutorial, we are going to use Arduino:
- Count the number of times a button is pressed
- Display the count number on LCD I2C display.
- Auto vertical and horizontal center align the count number on LCD I2C display.
In this tutorial, the button also is debounced without using delay() function. See Why do we need debouncing?
Hardware Required
Or you can buy the following kits:
| 1 | × | DIYables STEM V3 Starter Kit (Arduino included) | |
| 1 | × | DIYables Sensor Kit (30 sensors/displays) | |
| 1 | × | DIYables Sensor Kit (18 sensors/displays) |
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables .
Additionally, some links direct to products from our own brand, DIYables .
Buy Note: Another option is to create the LCD I2C display by pairing LCD 1602 Display and PCF8574 I2C Adapter Module.
Wiring Diagram

This image is created using Fritzing. Click to enlarge image
Video Tutorial
We are considering to make the video tutorials. If you think the video tutorials are essential, please subscribe to our YouTube channel to give us motivation for making the videos.

