Serial Monitor Button Counter

Requires ,

This project counts and displays button presses on an Arduino board via the Serial Monitor.

The circuit monitors a button connected to the Arduino, incrementing a counter each time the button is pressed. When a press is detected, the current count is sent through the serial connection to display on your computer. The program uses a simple state tracking mechanism to avoid counting multiple presses when the button is held down.

Parts List

  • Arduino board
  • Momentary push button
  • 10kΩ resistor (pull-down)
  • Breadboard
  • Jumper wires

Assembly Instructions

  1. Connect one terminal of the push button to digital pin 2 on the Arduino
  2. Connect the other terminal of the push button to the 5V pin
  3. Connect a 10kΩ resistor between digital pin 2 and GND (this acts as a pull-down resistor)
  4. Connect the Arduino to your computer and upload the code
  5. Open the Serial Monitor and ensure it’s set to 115200 baud rate
  6. Press the button to see the count increment on the Serial Monitor