Week 2 · Lesson 1 · 55 minutes
Choose the event that changes the state
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
- Open your October design. Mark the user, four requirements and chosen signals. Check what your saved sketch and board actually do.
- Choose an action a person can take. A manual report is enough. Write three rules: current state, event, condition, next state and output of each LED. Use your own state meanings.
- Example: Unknown + desk helper reports free + valid report → Available → A steady, B off. The report is manual; it does not prove the desk is empty.
- User action
- Current state + condition
- Next state
- LED A + LED B
Check your result: Give a partner one starting state and event. They should be able to predict the new state and both lights from your table.
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.
Original classroom model
State plus a validated event
Multiple LEDs on breadboards are confirmed; three-state code and networking are not. Keep each student’s October signal meanings. This manual desk-report example is a model, not occupancy sensing.
Use the buttons to step through. With scripts off, every frame remains readable.
One explicit transition
- Current: unknown
- Event: report 1
- Valid: 0 / 1 / 2
- Next: available
- LED A steady
The starter sets state to 1 and refreshes report time. The teacher must verify each LED and its own resistor; a diagram does not prove hardware works.
Read the diagram
- Current: unknown
- Event: report 1
- Valid: 0 / 1 / 2
- Next: available
- LED A steady
A report can expire
- Report age grows
- 60 s demo limit
- State → unknown
- Both double-flash
In the supplied starter, expiry applies to nonzero states after 60000 ms without a valid report. Justify a suitable timeout and meaning for your own user.
Read the diagram
- Report age grows
- 60 s demo limit
- State → unknown
- Both double-flash
What must the user know before relying on an available report?
Discuss before revealing
Who reported it, how old it is and what it means. A manual report can be wrong or stale. Define your own useful event, condition, next state and output.
See it
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.
Choose the event that changes the state · 10 minutes
Continue your October user, chosen solution and four requirements. The multi-LED breadboard from November 5 is the starting build, not evidence of finished state logic. Identify a real user action that should change its state; do not repeat A/B research.
A library-seat light is green because somebody selected available. Does it prove the seat is empty?
Reveal reasoning
No. It is a manual report. Label who reports what, when it becomes out of date, and what the user should do before relying on it.
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
- Write current state / event / condition / next state / output for three useful transitions. A browser button is sufficient input; sensors and new purchases are optional.
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.
Choose the event that changes the state / Program and trace your transitions
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.
- Open this week’s handout and your saved code.
- 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
- Choose the event that changes the state / Program and trace your transitions
- Personal evidence and explanation
- Identify your own technical action, evidence file, actual outcome and limitation.
| Band | Observable evidence |
|---|---|
| 0 | No assessable evidence for this task yet. |
| 1–2 | Identifies parts of the task; personal work and results are difficult to follow. |
| 3–4 | Completes some steps with support; evidence or explanations have gaps. |
| 5–6 | Completes the task with traceable personal evidence and explains results and limitations. |
| 7–8 | Works independently, uses precise evidence to justify decisions and checks the effect of changes. |