🏀 Arduino Mini Basketball Game – Goal Counter with IR Sensor, 7-Segment Display & I2C LCD
📌 Project Overview
This project is a Mini Basketball Game made with an Arduino board, IR sensor, 7-segment display, buzzer, and an I2C LCD.
The IR sensor detects when the ball goes through the hoop.
The 7-segment display shows the score (0–9 for 1 digit).
The I2C LCD shows the game title and flashes “GOAL!” when a score is made.
The buzzer plays a short beep sound whenever a goal is scored.
The Arduino RESET button resets the game.
This is a fun project for kids, students, and hobbyists who want to learn Arduino in a playful way.
🎯 Components Required
-
Arduino UNO (or compatible board)
-
1 × IR Sensor Module
-
1 × 7-Segment Display (Common Cathode, 1-digit)
-
1 × 16×2 LCD with I2C module
-
1 × Buzzer (active)
-
Jumper wires
-
Breadboard or PCB
🔌 Circuit Connections
IR Sensor
| IR Sensor Pin | Arduino Pin |
|---|---|
| VCC | 5V |
| GND | GND |
| OUT | D2 |
Buzzer
| Buzzer Pin | Arduino Pin |
|---|---|
| + | D8 |
| – | GND |
7-Segment Display (1-digit, common cathode)
| 7Segment | Arduino Pin |
|---|---|
| a | D4 |
| b | D5 |
| c | D6 |
| d | D7 |
| e | D8 |
| f | D9 |
| g | D10 |
| DP | Not used |
| Common Cathode | GND |
I2C LCD (16×2)
| LCD Pin | Arduino Pin |
|---|---|
| SDA | A4 |
| SCL | A5 |
| VCC | 5V |
| GND | GND |
⚡ How It Works
-
The IR sensor detects the basketball when it passes through the hoop.
-
Each goal increases the score counter.
-
The 7-segment display shows the current score.
-
The LCD screen shows the game title and flashes “GOAL!” when a basket is made.
-
The buzzer plays a beep sound each time a score is made.
-
The Arduino reset button restarts the game and sets the score back to 0.
Comments
Post a Comment