Light Following Bug
Two LDRs steer two motors toward a torch. Intermediate QA build: analog reads plus a simple compare.
Prompt
A cardboard bug that drives toward a flashlight. Two light sensors and two motors. Arduino Uno. Cutouts, wiring, and code.
Generated wiring
Generated code
Firmware
// QA log: light bug
void setup() {
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
void loop() {
int left = analogRead(A0);
int right = analogRead(A1);
analogWrite(5, left > right ? 160 : 40);
analogWrite(6, right > left ? 160 : 40);
delay(40);
}QA photos
No phone photo in the QA log yet for this build. Wiring and code above are the generated package.
Parts
- Arduino
- motors
- sensor
- cardboard
Difficulty and time are from the QA log for this prompt, not a timed class period.
If this build gets stuck
Try this prompt opens the copilot with the text filled in. It does not run a generation until you send it.


