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

Arduino Uno R3

Light to threshold

Measure the kit phototransistor circuit, collect evidence, calibrate a threshold, and publish a dependable light event.

CSTA 2026 mapping candidatesNot reviewed by CSTA
MS-DAT-DC-21Data & AnalysisMS-DAT-DI-27Data & Analysis

Students will

  • Identify the phototransistor collector and emitter before wiring
  • Read and describe an analog light-sensing signal
  • Choose and test a threshold between two measured conditions

Evidence of success

  • A table of repeated readings in two conditions
  • A threshold justified from measured values
  • Ten repeated trials with false triggers identified

Hardware

  • Arduino Uno R3
  • Starter Kit phototransistor
  • 10 kΩ resistor
  • Breadboard and jumper wires
  • Small light source

Prerequisites

  • Upload a sketch
  • Open Serial Monitor
  • Identify 5V, GND, and A0

Before class

  • Verify the actual phototransistor identity, polarity, and reviewed Starter Kit circuit
  • Confirm the 10 kΩ resistor value and breadboard rows
  • Provide stable bright and shaded test conditions

Reviewed connection map

Phototransistor sensing divider

5VSensor supply
Phototransistor + 10 kΩReviewed light-dependent divider
A0Voltage at the sensor-resistor junction
GNDShared return
  1. Build the reviewed Starter Kit phototransistor and 10 kΩ resistor circuit with power disconnected.
  2. Connect the divider junction to A0.
  3. Verify sensor orientation, 5V, and GND before connecting USB.

Build and test

  1. 01Identify the phototransistor collector and emitter from the reviewed part information
  2. 02With power disconnected, build the reviewed phototransistor and 10 kΩ resistor circuit with A0 at the signal junction
  3. 03Print analogRead(A0) once every 100 ms and observe whether readings rise or fall with light
  4. 04Record repeated shaded and illuminated readings, then choose a threshold between the observed ranges
  5. 05Test near the boundary and revise if false triggers occur

Read before uploading

Annotated Arduino sketch

const int SENSOR_PIN = A0;
int threshold = 500;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int reading = analogRead(SENSOR_PIN);
  bool lightEvent = reading > threshold;
  Serial.print(reading);
  Serial.print(" event=");
  Serial.println(lightEvent);
  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

Reading stays near 0 or 1023

Disconnect power, then verify the phototransistor polarity, A0 signal junction, resistor value, 5V, and GND.

Light makes the reading move in the opposite direction

Use the observed direction in the comparison rather than assuming that brighter must produce a larger value.

Trigger changes with room light

Recalibrate in the actual installation and shield the sensor where appropriate.

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-DAT-DC-21

Evaluate how different levels of precision and granularity in data collection affect accuracy, storage, and analysis.

Students compare repeated analog measurements and choose a useful level of precision for a threshold.

Lesson evidence: Bright and shaded reading table
MS-DAT-DI-27

Summarize a data investigation process, including potential biases, limitations, and supporting evidence.

Students collect repeated sensor readings, identify limitations, and support a threshold or response with evidence.

Lesson evidence: Threshold justification and ten-trial 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 · ohms-law

Sources and review

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

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.