Students will
- Attach and command a servo with the Servo library
- Constrain motion to reviewed positions
- Separate a control signal from actuator power requirements
Arduino Uno R3
Use a verified digital trigger to command two bounded servo positions and test the motion safely.
Reviewed connection map
Read before uploading
#include <Servo.h>
const int BUTTON_PIN = 8;
const int SERVO_PIN = 9;
Servo actuator;
void setup() {
pinMode(BUTTON_PIN, INPUT_PULLUP);
actuator.attach(SERVO_PIN);
actuator.write(20);
}
void loop() {
bool triggered = digitalRead(BUTTON_PIN) == LOW;
actuator.write(triggered ? 100 : 20);
delay(20);
}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.
Remove the mechanism, inspect the supply, and use an appropriate external servo supply with common ground if required.
Verify lead order, common ground, signal pin, and commanded angle bounds.
2026 middle school standards
These are evidence-based crosswalk candidates for curriculum review—not a claim of official alignment.
Students trace variables, selection, or iteration in the supplied sketch and connect code to physical behavior.
Lesson evidence: Trigger, angle variable, and motion traceStudents isolate variables, compare observed behavior with the intended purpose, and document a revision.
Lesson evidence: Range and repeated-trigger testpower-and-signals · component-boards · motor-types
Starting point, not verified curriculum. Review the actual hardware, circuit, code, power requirements, and classroom conditions.
After teaching this lesson