Understand a first firmware change
Use a blinking onboard LED to practise reading code, changing one value and checking the result against a prediction.
You needRead the code here first. Hardware practice requires an Arduino-compatible board with a documented onboard LED, a data-capable USB cable and its supported development setup.
Reference checked 6 September 2026. Authored exercise; no physical build result is claimed.
Understand the change
Identify your board
Use its official getting-started instructions and confirm the onboard LED behaviour. Some boards use addressable LEDs or active-low wiring; do not assume a random GPIO is a substitute.
Predict one change
Two 1000 ms delays give approximately a two-second cycle. Changing the first delay to 250 ms gives approximately 1.25 seconds. The HIGH interval changes, not the LOW interval.
Compare prediction and observation
If practising on hardware, upload the unchanged example first. Then make one edit and record the result. If upload fails, check the exact board, port, cable and error before asking the AI to rewrite the program.
A focused request to try
Use this with a suitable AI assistant. Its response will vary; compare it with the checks below.
Explain the supplied Arduino Blink sketch line by line. Predict the time for one full on/off cycle when both delays are 1000 ms. Then change only the on-time to 250 ms and predict the new cycle. Keep LED_BUILTIN. Ask for the exact board before recommending pin changes or installation steps.
Worked reference example
Read the example, predict one change, then check the result.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}Check your result
- Explain why both delays count towards the complete cycle.
- Keep a copy of the version that worked.
- Record the exact board and observed result before sharing a builder report.
Where this can go wrong
delay blocks this simple loop. A responsive project with buttons or several tasks may need non-blocking timing. Follow the official Blink Without Delay example when you reach that need.
Go to the source
Arduino Blink example. Confirm current tool instructions before using them.