LED signals
Create slow, faster and double-flash signals, explain the delays, and revise a pattern using partner feedback.
For this lesson
Related assignments
- Assignment 2. ESP32 LED Blink tests
Follow the linked handout and the submission instructions in Toddle.
Assignment on the calendar →
Submit in Toddle. The assignment instructions above specify what to hand in.
Read the handout text online
LED signals
Control timing and make a clear double flash
Use your working ESP32 and LED to make three light patterns. Test your double flash with a partner, then improve one timing value. Your task score is out of 8.
Name __________________________ Class __________ Date ______________
0–10 min Start with what works
1. Open your last working LED program. Keep the same wiring, LED pin and successful board settings.2. Upload and check that the LED responds to your program.3. Save a backup. Work in a new sketch named G10_LED_Signal_Name.
If it will not upload, ask your teacher before changing settings or wiring. Your teacher can arrange a working shared setup so you can test your own code.
10–15 min Understand the timing
Find the instructions that turn your LED on and off. Find the delay after each one. A delay pauses the program before the next instruction.
delay(1000); = 1 second delay(500); = 0.5 seconds delay(200); = 0.2 seconds
The delay after ON controls how long the light stays on. The delay after OFF controls how long it stays off. Keep the on/off commands that already work.
Predict: If I change both delays from 1000 to 500, the blink will ________________
15–25 min Make two blinks
Change only the delay numbers. Upload each version and watch it repeat. Record the result on page 2. Show your teacher or record a short video of each before moving on.
| Pattern | LED on | LED off |
| Slow blink | 1000 ms | 1000 ms |
| Faster blink | 500 ms | 500 ms |
25–35 min Make a double flash
Inside loop(), use two ON → wait → OFF → wait sequences. Copy your existing sequence once, then set the four delays in this order. Keep setup() and your LED pin unchanged.
| Step | LED state | Wait |
| 1 | ON for the first flash | 200 ms |
| 2 | OFF between flashes | 200 ms |
| 3 | ON for the second flash | 200 ms |
| 4 | OFF before the next pair | 1500 ms |
Upload. Watch at least three repetitions. You should see: flash, flash, pause — flash, flash, pause. If it differs, compare your code with the four steps above.
AI help is allowed. Give it your working code and ask it to change the timing only. You must be able to point to an on-time and an off-time and explain their effect.
35–42 min Test with a partner
Let your partner watch three repetitions without explaining the pattern first. Ask: “What pattern did you see? Could you clearly see two flashes and a pause?”
Partner name ____________________ My partner observed __________________
________________________________________________________________________
42–47 min Change one thing and retest
Use the feedback to change one delay. If the pattern was already clear, try a longer pause to make the pairs easier to separate. Upload and ask your partner to watch again.
I changed the __________________ delay from __________ ms to __________ ms
because _________________________________________________________________
After retesting, my partner observed _________________________________________
My test record
| Version | Timing values used in ms | What actually happened |
| Slow blink | ON ______ OFF ______ | ________________________ |
| Faster blink | ON ______ OFF ______ | ________________________ |
| Final double flash | ON ____ OFF ____ ON ____ OFF ____ | ________________________ |
Explain one ON delay and one OFF delay in your final code. You may explain aloud to your teacher instead.
ON delay __________ means _______________________________________________
OFF delay __________ means ______________________________________________
How you earn your 8 points
Each row earns 1 point when the evidence is shown, or 0 if it is not yet shown. Your teacher adds the points for a classroom task score out of 8.
| Evidence | Points |
| Slow blink works with 1000 ms on and 1000 ms off. | / 1 |
| Faster blink works with 500 ms on and 500 ms off. | / 1 |
| Double flash has two distinct flashes. | / 1 |
| A longer pause separates the pairs and the pattern repeats. | / 1 |
| You correctly explain one ON delay and one OFF delay. | / 1 |
| You record a specific observation from your partner. | / 1 |
| You change one timing value, explain the link to feedback, and retest. | / 1 |
| You submit your final code and demonstration evidence. | / 1 |
| Total | / 8 |
47–50 min Save and submit
□ Final sketch: G10_LED_Signal_Name, including the .ino file.□ Short video of three final repetitions, or a teacher-witnessed demonstration.□ This completed handout, plus evidence of the slow and faster blinks.
If you share a board, submit your own code and test record. Tell your teacher about equipment problems; you can demonstrate your own work on a working shared setup.