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
1 | × | Arduino UNO or Genuino UNO | |
1 | × | USB 2.0 cable type A/B | |
1 | × | Button | |
1 | × | LCD I2C | |
1 | × | Breadboard | |
1 | × | Jumper Wires | |
1 | × | (Optional) 9V Power Adapter for Arduino | |
1 | × | (Optional) Screw Terminal Block Shield for Arduino Uno |
Or you can buy the following sensor kit:
1 | × | DIYables Sensor Kit 30 types, 69 units |
Please note: These are affiliate links. If you buy the components through these links, We may get a commission at no extra cost to you. We appreciate it.
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.
The Best Arduino Starter Kit
See Also
Follow Us