Heading Broadcast Network Topology
Run the Heading Broadcast Network Topology MicroSim Fullscreen
Iframe Embed Code
You can add this MicroSim to any web page by adding this to your HTML:
1 2 3 4 | |
About This MicroSim
A network topology is the shape of a network: who is connected to whom, and which way the messages flow. This diagram shows the topology of the heading swarm. One master robot hosts its own WiFi network and sends a UDP broadcast (one packet that every device on the network receives) with its compass heading. Every follower just listens.
The toolbar lets you switch between three topologies you have met in this course:
| View | Where it comes from | Shape |
|---|---|---|
| UDP broadcast | Chapter 13 (this section) | One sender, many listeners, one packet per update |
| BLE pairing | Chapter 12 | One leader with a separate connection to each follower |
| Router WiFi | Chapter 11 | A router someone else set up, with one-to-one TCP connections |
The Compare card at the top right always shows four facts for the current view: who hosts the network, what the links look like, how many sends the leader makes per update, and what changes when you add a robot.
This MicroSim goes with Chapter 13: Swarm Robotics and Advanced Engineering Patterns, in the section "Hosting the Swarm Network: WiFi Access Point and UDP Broadcast."
How to Use
- Start on UDP broadcast. Hover over (or tap) the Master Robot, a Follower, one of the UDP heading packet labels, and the dashed network box. Read each explanation in the Details card.
- Check Add Follower 4. Look at the Compare card. What changed for the master?
- Switch to BLE pairing with Follower 4 still checked. How many writes does the leader make now for each update?
- Switch to Router WiFi. Who hosts this network? Could your swarm work in a park with no router nearby?
- Explain in one sentence why the heading swarm uses UDP broadcast instead of BLE.
Lesson Plan
Learning Objective
Students will differentiate (Bloom's Taxonomy: Analyze) the one-to-many UDP broadcast topology used for heading synchronization from the one-to-one BLE pairing topology of Chapter 12 and the router-hosted WiFi topology of Chapter 11, and justify which one scales better as followers are added.
Grade Level
Grades 8–12
Duration
15–20 minutes
Prerequisites
- Station-mode WiFi and TCP web servers from Chapter 11: Wireless Networking and Web Servers
- BLE central/peripheral roles and connections from Chapter 12: Bluetooth Low Energy Fundamentals
- The Chapter 13 section on WiFi access point host mode and UDP broadcast
Activities
- Warm-up (3 min): Ask students to sketch, without looking, how Chapter 12's BLE leader reached two followers. Collect whether their sketch shows one link or two.
- Guided comparison (7 min): In pairs, students fill in a three-column table (UDP broadcast, BLE pairing, Router WiFi) with the four Compare-card facts, first with three followers and then with Add Follower 4 checked. The instructor then asks which cells changed between the two runs; only the BLE sends-per-update and link count should change.
- Scaling argument (5 min): Each pair writes a short claim–evidence–reasoning paragraph: "Which topology is best for a swarm of 10 robots, and why?" Evidence must cite a specific value from the Compare card.
- Transfer (3 min): Show the chapter's
broadcast_loop()and ask students to point to the single line that would have to become a loop in the BLE version (thesendto()call).
Discussion Questions
- Why is a dropped UDP packet not a failure for a heading follower, when a dropped TCP packet would be retransmitted?
- The master both hosts the network and sends the broadcast. What happens to the swarm if the master's battery dies?
- Chapter 11's router topology needs a network that already exists. Where would that be a problem for a robot demonstration?
Assessment
- Formative: The completed comparison table from Activity 2, checked for the correct sends-per-update values (1, N, and one per connection).
- Exit ticket: "A teammate adds Follower 5 to the UDP swarm. List every change needed on the master." (Expected answer: none; the new robot joins the access point and listens on the same UDP port.)
- Rubric (4-point): Exemplary — distinguishes all three topologies by host, link shape, and scaling cost, with evidence; Proficient — distinguishes UDP broadcast from BLE pairing correctly but is vague about the router case; Developing — describes the diagrams without explaining scaling; Beginning — treats all three as equivalent "wireless" links.
References
- Broadcasting (networking) (Wikipedia) — how one packet sent to a broadcast address reaches every host on a network.
- User Datagram Protocol (Wikipedia) — connectionless, best-effort delivery used for the heading packets.
- Network topology (Wikipedia) — background on star, point-to-point, and broadcast network shapes.
- MicroPython network.WLAN documentation —
station mode (
STA_IF) versus access point mode (AP_IF) on the Pico W. - MicroPython socket documentation —
the
SOCK_DGRAMsockets andsendto()used by the master's broadcast loop. - Swarm Robot Build Plan — the full master and follower scripts for this course's hardware.