Week 4 · Lesson 1 · 55 minutes

Keep flashing responsive

Build and explain this stage of your own connected prototype.

Planned lesson. Follow your teacher’s teaching order.

Task steps and checks

Do the work

  1. Back up the working version. Adapt ledOn to your October signals. Use elapsed time to pick the flash phase, not a long delay that stops the loop from checking input.
  2. Example: with elapsed time % 500 < 250, the LED is on at 100 ms, off at 300 ms, and on at 550 ms. In between, the loop can check new input.
  3. Send a browser action during the flashing state. Measure from action to visible change for three trials. Note the device, method and units. If access is unavailable, record Serial timing separately; that is not a browser test.
Follow the path
  1. Loop
  2. Check request
  3. Read elapsed time
  4. Update LEDs
  5. Repeat

Check your result: Three actual times or clearly marked NOT TESTED results show what you checked. A simple HTTP starter cannot guarantee every future response time.

Revised weekly handout pages: 1, 2.

Materials

Existing October design, saved code, teacher-verified ESP32 circuit, USB data cable and computer; shared hardware, individual evidence.

Resources

Vocabulary

State transition
A rule linking the current state and an event to the next state and output.

More examples and practice

Retrieve your saved version · 5 minutes

Open your own latest code and evidence. State what actually works and the next check; keep earlier versions.

Keep flashing responsive · 10 minutes

Use elapsed time rather than long delay calls in the final system. The loop repeatedly services requests, checks input and updates the LED. The starter pattern engine is non-blocking; its simple HTTP server is not a hard real-time guarantee.

For rapid flash, age % 500 < 250: what happens at ages 100, 300 and 550 ms?

Reveal reasoning

On, off, on. The remainder repeats every 500 ms. The loop can handle input between checks instead of waiting inside a 250 ms delay.

Build test and record · 30 minutes

Work through the task below. Take turns with hardware; each student records their own actions, predictions and observations.

Practice

  1. Adapt ledOn to your October patterns. While it flashes, change state from the browser and measure response time over three trials. Keep the circuit backup and record the changed code and observations.

Save and explain your evidence · 10 minutes

Save the version and results. Explain one decision and one limitation to a partner. Record unfinished work for the next lesson instead of claiming success.

Keep flashing responsive / Handle unknown and disconnected states

Do only the parts you did not finish in class. Write what really happened; if you did not test something, write NOT TESTED. This is one task for the week, and nothing else is due.

  1. Open this week’s handout and your saved code.
  2. Finish the evidence for both lessons. Use only your saved code and real results.

You are finished when: The evidence for both lessons is complete and matches what you really did.

Why this matters: Each week’s evidence becomes part of the connected prototype evidence you submit in Week 8.

  • There is no hardware task at home.

Revised weekly handout pages: 1, 2.

Weekly homework (Word) · Chinese weekly handout (Word)

Feedback on this week’s evidence

Task feedback only. Final C and D are separate best-fit judgements out of 8 using the school’s current MYP Year 5 criteria; do not average weekly bands.

This week’s task
Keep flashing responsive / Handle unknown and disconnected states
Personal evidence and explanation
Identify your own technical action, evidence file, actual outcome and limitation.
BandObservable evidence
0No assessable evidence for this task yet.
1–2Identifies parts of the task; personal work and results are difficult to follow.
3–4Completes some steps with support; evidence or explanations have gaps.
5–6Completes the task with traceable personal evidence and explains results and limitations.
7–8Works independently, uses precise evidence to justify decisions and checks the effect of changes.