Students will
- Wire a potentiometer as a voltage divider
- Read and interpret analog values
- Map an observed input range to a bounded output range
Arduino Uno R3
Read a potentiometer, observe its full range, and map the measurement to a bounded output value.
Reviewed connection map
Read before uploading
const int CONTROL_PIN = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int reading = analogRead(CONTROL_PIN);
int mappedValue = map(reading, 0, 1023, 0, 180);
mappedValue = constrain(mappedValue, 0, 180);
Serial.print(reading);
Serial.print(" mapped=");
Serial.println(mappedValue);
delay(100);
}Optional engineering record
Choose the prompts that help students explain predictions, evidence, debugging, and transfer. Saving creates a new entry in this browser’s Rudi notebook.
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.
Confirm A0 connects to the center wiper rather than an outside pin.
Swap the two outside 5V and GND connections; do not move the wiper connection.
2026 middle school standards
These are evidence-based crosswalk candidates for curriculum review—not a claim of official alignment.
Students store and manipulate integer sensor and mapped output values.
Lesson evidence: Recorded minimum, midpoint, maximum, and mapped valuesStudents trace variables, selection, or iteration in the supplied sketch and connect code to physical behavior.
Lesson evidence: Annotated reading and mapping statementscomponent-boards · power-and-signals · sketch-foundations
Starting point, not verified curriculum. Review the actual hardware, circuit, code, power requirements, and classroom conditions.
After teaching this lesson