Lab: E2E Mini-Project on Digital Twin
Course 2 · Module 6 Type: Capstone / End-to-End Suggested time: ~2 hours (+ extra time for the README and evidence)
Read first: Lesson · Case brief · Course package · ← TOC · ← M05
Useful references during the lab
Section titled “Useful references during the lab”| Document | Use when |
|---|---|
| M03 · M04 · M05 | The device · co-sim · MQTT |
Hackathon web-app/ |
ex06 · ex15 (or ex09) |
| Developer Hub | Firmware examples |
| Course 1 M08 | The Capstone format on the board side |
Lab Goals
Section titled “Lab Goals”Deliver a short demo on the Twin, covering the full path:
stimulus → firmware → Studio visualization → an external dashboard/MQTT with a test table of ≥ 3 cases, and a rerunnable README.
Prerequisites
Section titled “Prerequisites”- M02’s Link is stable
- M03 has a virtual device + an event script (or equivalent)
- M04’s co-sim passed on at least one Path
- M05 already succeeded at Start broker + a subscriber
- A deliverables folder +
lab-notes/
Recommended brief — pick a domain story
Section titled “Recommended brief — pick a domain story”Start from the Smart Environmental Monitor (IoT / environmental), or map it onto another domain per README §4:
| Domain | Story emphasis | Main sensor | Extra evidence |
|---|---|---|---|
| IoT | A node ↔ the cloud | SHT40 + state | ex06 + ex15 |
| Home | A comfortable / safe room | SHT40 + a switch | ex06 + an MQTT cmd |
| Industrial | An alarm on the line | temp/IMU | ex06 + ex08 + ex15 |
| Health-sim | A watch link (simulated) | BMI270 + SHT40 | ex05 + ex08 + ex09 |
| Part | Example choice (adjust per domain) |
|---|---|
| Sensors | SHT40 temp/humidity (± another sensor) |
| Behavior | Over a threshold → a state/event + a signal on the host |
| Script | Quiet → Warm/Alert |
| MQTT | Publish telemetry; optionally subscribe to a command |
| Evidence | Studio + ex06 + (ex15 or ex09) |
Fill in the detail in e2e-case-brief.md
Lab A — Lock architecture (required)
Section titled “Lab A — Lock architecture (required)”- Choose a domain from README §4 (IoT / Home / Industrial / Health-sim)
- Draw/write the 4-step diagram from Lesson §2, and add event names matching the domain
- State the Path: Simulator / Board / Both
- State the MQTT topic and the web consumer page you’ll use as evidence
- Copy the README outline from Lesson §6.2 into your project (fill in the Domain line)
Pass when: a teammate reads it and knows the domain + which tool to open first, without asking anything further
Lab B — Assemble the running demo (required)
Section titled “Lab B — Assemble the running demo (required)”- Bring up Studio (a single backend) + co-sim
- Run your event script / scene
- Confirm the value on Studio
- Serve
web-app/→ open ex06 to see the relevant sensors - Start broker → publish (and/or subscribe) → confirm on ex15 or ex09
Pass when: the Normal demo runs continuously for ≥ 1 minute without the Link dropping on its own
Lab C — Three E2E test cases (required)
Section titled “Lab C — Three E2E test cases (required)”Run and fill in the table in the case brief:
| Case | Must prove at minimum |
|---|---|
| Normal | Telemetry updates on Studio + the consumer |
| Stimulus | A threshold / switch / script clearly changes a state or event |
| Command / fault | An MQTT command, or briefly cutting the broker/stream then recovering |
Pass when: at least 3 rows have a real result + Passed? = Yes (or Fail, with a reason and an acceptable workaround)
Lab D — Log triage drill (recommended)
Section titled “Lab D — Log triage drill (recommended)”Deliberately break one thing (turn off the broker / stop the script / open the wrong panel), then:
- Work through the layers in Lesson §3
- Note the layer where the problem was found
- Fix it back to a green demo
Pass when: there is a line in the case brief’s issues/fixes section
Lab E — Package for handoff (required)
Section titled “Lab E — Package for handoff (required)”- A rerunnable README
- The case brief filled in completely
- Screenshot/clip evidence (Studio + ex06 and the MQTT consumer)
- No password in the submitted files
- The checklist from course-package.md
Deliverables checklist
Section titled “Deliverables checklist”- Labs A–C, E passed
- (Recommended) Lab D
- A link/folder for the project, ready to hand off
Troubleshooting
Section titled “Troubleshooting”| Symptom | Approach |
|---|---|
| The demo runs a while, then drops | Go back to M02/M04’s bring-up · don’t mix backends |
| ex06 is empty but Studio has values | Serve the right folder · check the connection badge · the mask/fields |
| MQTT is empty | Start broker · check the topic matches · it’s a different pipe from Live Data |
| A stimulus doesn’t show on the consumer | Check the script actually ran · staleness · the publish rate |
| The deliverable has a secret in it | Remove it and put a placeholder in the README |
Lesson · Case brief · Course package · TOC
Cite this lesson
If you teach from this lesson or reuse it in slides or documents, credit it with the text below. If you changed it, add (adapted) after the title.
"Lab: E2E Mini-Project on Digital Twin" from TESA Open Knowledge by the Thai Embedded Systems Association (TESA), https://github.com/tesaiot/tesa-qualification-program, licensed under CC BY-NC 4.0
Thai attribution: "แล็บ Capstone: มินิโปรเจกต์ E2E บน Digital Twin" จาก TESA Open Knowledge โดยสมาคมสมองกลฝังตัวไทย (Thai Embedded Systems Association: TESA) https://github.com/tesaiot/tesa-qualification-program สัญญาอนุญาต CC BY-NC 4.0
Lesson link: https://tesaiot.github.io/tesa-qualification-program/en/courses/digital-twin/m06-integration/l02-lab/
This lesson adapts the source below; keep its credit too.
https://github.com/drsanti/TESAIoT-Courses/blob/287c21814ba8c75f693136616dcd270349a15966/C2/M06/lab.md · Original content by Asst. Prof. Dr. Santi Nuratch (ผศ.ดร.สันติ นุราช), KMUTT. Course 2 (C2/) of drsanti/TESAIoT-Courses. TESA funded the work and holds the rights; published here under CC BY-NC 4.0. The upstream repository carries no licence file. Text kept faithful; structure, front matter, quizzes and notes added by TESA Open Knowledge.
TESA Open Knowledge · © 2026 สมาคมสมองกลฝังตัวไทย (TESA) · CC BY-NC 4.0
Content is licensed CC BY-NC 4.0. Reuse it non-commercially and credit the Thai Embedded Systems Association (TESA) every time. · How to cite TESA