Guided physical computing, beginning with the Arduino Starter Kit Classroom Pack

Arduino Uno R3

Display a sensor value on the LCD

Wire the kit’s 16 × 2 character LCD in 4-bit mode and display a changing analog value with a clear label.

CSTA 2026 mapping candidatesNot reviewed by CSTA
MS-PRO-RD-17ProgrammingMS-PRO-TR-19Programming

Students will

  • Distinguish LCD power, contrast, control, and data connections
  • Initialize and update a 16 × 2 display with the LiquidCrystal library
  • Present a changing measurement without leaving stale characters

Evidence of success

  • The display shows a stable label and changing numeric value
  • The student identifies the contrast control separately from the measured input
  • Shorter values do not leave stale digits on the display

Hardware

  • Arduino Uno R3
  • 16 × 2 alphanumeric LCD
  • Two 10 kΩ potentiometers
  • 220 Ω resistor for the reviewed backlight circuit
  • Breadboard and jumper wires

Prerequisites

  • Read and map an analog control
  • Trace breadboard nodes
  • Identify 5V and GND

Before class

  • Verify the exact LCD pin numbering and orientation
  • Prepare a known-good 4-bit circuit and reviewed backlight connection
  • Use one potentiometer for LCD contrast and the second as a safe analog test input

Reviewed connection map

LCD and sensor connections

A0Reviewed analog sensor signal
Uno D12, D11, D5-D2LCD RS, enable, and four data lines
16 × 2 LCDRW to GND; contrast through the kit potentiometer
5V + GNDShared logic power and return
  1. Wire the LCD pins to match LiquidCrystal lcd(12, 11, 5, 4, 3, 2).
  2. Connect RW to GND and use the reviewed contrast circuit.
  3. Connect the sensor signal to A0 only after verifying its power and ground.

Build and test

  1. 01Identify LCD pins VSS, VDD, VO, RS, RW, E, DB4-DB7, and the backlight pins from the reviewed display information
  2. 02With power disconnected, wire the LCD in 4-bit mode and connect the contrast potentiometer wiper to VO
  3. 03Connect a second 10 kΩ potentiometer to A0 as a changing test value
  4. 04Upload the sketch, adjust contrast until characters are readable, and verify the value changes
  5. 05Replace the A0 potentiometer with a previously tested sensor only after matching that sensor lesson's circuit

Read before uploading

Annotated Arduino sketch

#include <LiquidCrystal.h>

const int SENSOR_PIN = A0;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("Sensor value");
}

void loop() {
  int reading = analogRead(SENSOR_PIN);
  lcd.setCursor(0, 1);
  lcd.print(reading);
  lcd.print("    ");
  delay(100);
}

Optional engineering record

Record evidence from this lesson

Choose the prompts that help students explain predictions, evidence, debugging, and transfer. Saving creates a new entry in this browser’s Rudi notebook.

Record your thinking — optional4 prompts

Use these prompts if they help students capture evidence, decisions, or questions. You do not need to complete every prompt or create an entry at every step.

Nothing is saved until you choose this button.

Troubleshooting

The backlight is on but no characters are visible

Adjust contrast slowly, then verify VO, RS, E, DB4-DB7, RW-to-GND, and the sketch's pin order.

Blocks or random characters appear

Check LCD orientation, power, ground, 4-bit data wiring, and the LiquidCrystal constructor before changing code.

Old digits remain after the value decreases

Print spaces after the value or overwrite the complete field before the next update.

2026 middle school standards

Potential CSTA connections

Not reviewed by CSTA

These are evidence-based crosswalk candidates for curriculum review—not a claim of official alignment.

MS-PRO-RD-17

Analyze the roles of iteration, selection, variables, and procedures in a segment of code.

Students trace variables, selection, or iteration in the supplied sketch and connect code to physical behavior.

Lesson evidence: Explanation of variables, iteration, and display update statements
MS-PRO-TR-19

Use systematic strategies to test, refine, and document changes to a computing technology to meet the intended purpose.

Students isolate variables, compare observed behavior with the intended purpose, and document a revision.

Lesson evidence: Display readability and stale-character test
View the official 2026 CSTA standardsStandard text: Computer Science Teachers Association (2026), CC BY-NC-SA 4.0.

Supporting concepts

component-boards · power-and-signals · sketch-foundations

Sources and review

Arduino Uno R3 documentationArduino Projects Book · CC BY-NC-SA 3.0Arduino LiquidCrystal library

Starting point, not verified curriculum. Review the actual hardware, circuit, code, power requirements, and classroom conditions.

After teaching this lesson

Make one bounded change—or connect the skill to a project.