2.15. Classroom Response System
| Description | This project simulates an electronic polling system used in classrooms. Students submit answers using buttons, and results are displayed live on the LCD screen. |
|---|---|
| Use case | This project is connected to real-world uses such as: classroom response systems, surveys, quizzes, and electronic voting platforms. It demonstrates how multiple inputs can be tracked and displayed in real time for instant feedback. |
Components (Things You will need)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|
Building the circuit
Things Needed:
- Arduino Uno
- Arduino USB Cable
- Breadboard
- Jumper Wires
- Push Buttons (x4)
- LCD Display
- Push Button
Mounting the component on the breadboard and wiring the circuit
Step 1: Connect the 5V pin on the Arduino Uno to the positive rail on the breadboard and the GND pin to the negative rail.
Step 2: Place the four push buttons and the I2C LCD display on the breadboard. Ensure that the push buttons are positioned correctly across the center gap of the breadboard.
-
Connect one terminal of the first push button to Digital Pin 2 (Button A).
-
Connect one terminal of the second push button to Digital Pin 3 (Button B).
-
Connect one terminal of the third push button to Digital Pin 4 (Button C).
-
Connect one terminal of the fourth push button to Digital Pin 5 (Button D).
-
Connect the other terminal of all four push buttons to the ground rail on the breadboard.
Step 3: Connect the I2C LCD display.
-
Connect the VCC pin of the I2C LCD display to the 5V power rail on the breadboard.
-
Connect the GND pin of the LCD display to the ground rail.
-
Connect the SDA pin of the I2C LCD display to A4 on the Arduino Uno.
-
Connect the SCL pin to A5 using jumper wires.
Step 4: Ensure that the GND connections of all push buttons and the I2C LCD display are connected to the same ground line. A common ground is required for the components to operate correctly.

Step 5: After confirming that all connections are correct, connect the USB cable to the Arduino Uno board and the computer to power the circuit.
Make sure to connect the Arduino USB cable to the Arduino board.
PROGRAMMING
Step 1: Open your Arduino IDE. See how to set up here: Getting Started.
Step 2: Write the complete program implementing the system logic with appropriate pin definitions, setup configuration, and the main control loop.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
// Button Pins
const int buttonA = 2;
const int buttonB = 3;
const int buttonC = 4;
const int buttonD = 5;
// Vote Counters
int votesA = 0;
int votesB = 0;
int votesC = 0;
int votesD = 0;
// Previous button states
bool lastA = HIGH;
bool lastB = HIGH;
bool lastC = HIGH;
bool lastD = HIGH;
void setup()
{
Serial.begin(9600);
pinMode(buttonA, INPUT_PULLUP);
pinMode(buttonB, INPUT_PULLUP);
pinMode(buttonC, INPUT_PULLUP);
pinMode(buttonD, INPUT_PULLUP);
lcd.init();
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Class Response");
lcd.setCursor(0,1);
lcd.print("System Ready");
delay(2000);
updateDisplay();
}
void loop()
{
checkButtons();
}
void checkButtons()
{
bool currentA = digitalRead(buttonA);
bool currentB = digitalRead(buttonB);
bool currentC = digitalRead(buttonC);
bool currentD = digitalRead(buttonD);
if(lastA == HIGH && currentA == LOW)
{
votesA++;
showVote("Vote A");
}
if(lastB == HIGH && currentB == LOW)
{
votesB++;
showVote("Vote B");
}
if(lastC == HIGH && currentC == LOW)
{
votesC++;
showVote("Vote C");
}
if(lastD == HIGH && currentD == LOW)
{
votesD++;
showVote("Vote D");
}
lastA = currentA;
lastB = currentB;
lastC = currentC;
lastD = currentD;
}
void showVote(String option)
{
Serial.println(option);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(option);
lcd.setCursor(0,1);
lcd.print("Recorded");
delay(800);
updateDisplay();
}
void updateDisplay()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("A:");
lcd.print(votesA);
lcd.print(" B:");
lcd.print(votesB);
lcd.setCursor(0,1);
lcd.print("C:");
lcd.print(votesC);
lcd.print(" D:");
lcd.print(votesD);
}
Step 3: Save your code. See the Getting Started section
Step 4: Select the arduino board and port See the Getting Started section:Selecting Arduino Board Type and Uploading your code.
Step 5: Upload your code. See the Getting Started section:Selecting Arduino Board Type and Uploading your code
CONCLUSION
In this project, you built a Classroom Response System that records button presses as votes and displays the results on an LCD screen. This project demonstrates how Arduino can be used to create simple electronic polling and voting systems.





