Grade 10 · Connected devices

LED signals

Create slow, faster and double-flash signals, explain the delays, and revise a pattern using partner feedback.

For this lesson

2 pages · Use the handout for the complete instructions, examples and response spaces.

Related assignments

  • Assignment 2. ESP32 LED Blink testsDue 23 Sept 2026 at 09:30 · China time

    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

For diagrams, visual examples and the full layout, open the handout above.

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.

PatternLED onLED off
Slow blink1000 ms1000 ms
Faster blink500 ms500 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.

StepLED stateWait
1ON for the first flash200 ms
2OFF between flashes200 ms
3ON for the second flash200 ms
4OFF before the next pair1500 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

VersionTiming values used in msWhat actually happened
Slow blinkON ______ OFF ______________________________
Faster blinkON ______ OFF ______________________________
Final double flashON ____ 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.

EvidencePoints
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.