Lesson 7 · Blockly Challenges & Synthesis
Lesson 7 · Blockly Challenges & Synthesis
Teacher mode is on. Toggle it off (bottom-right) to preview the student view.
This is your Blockly capstone. There's nothing new to learn — instead you'll put everything together (loops, functions, parameters, motor control) to solve two open-ended challenges. Like real engineering problems, these have many right answers.
Learning Objectives
By the end of this lesson you will be able to:
- Combine loops, functions, parameters, and motor control in one program
- Plan a program's structure before you start dragging blocks
- Debug with a repeatable process: predict → test → observe → adjust
- Judge trade-offs (precision vs. speed, simple vs. flexible)
Challenge 1 · Precision navigation
Your robot is a delivery vehicle. It has to follow a marked course and stop on a target within ±30 cm, then signal that it arrived.
Measure the course, plan the moves on paper, then build it. Everything you need you already have: Straight, Turn, a function to wrap the route, and the debugging loop of predict → run → watch → adjust.
Test it in pieces. Get the first straight-and-turn landing correctly before you add the next. That's far easier than running all six moves and guessing which one is off.
Your robot overshoots the target by about 15 cm every run. What's the most sensible fix?
Challenge 2 · Creative design
Now design your own robotic performance. Pick one (or invent your own) and bring the whole toolkit:
Multi-shape artist
Use your polygon function to lay out a design — pentagon, hexagon, octagon arranged into a pattern.
Precision parking
Drive in, then use Set effort for a slow, careful final nudge to park centered in a marked box.
Robot choreography
Combine curves, spins, and the LED into a 30-second performance that tells a little story.
The workflow is the same one professionals use: brainstorm → break it into functions → pseudocode → build core functions → test each → assemble → refine.
Your creative program is one giant stack of 40 blocks and it's hard to debug. What's the best move?
Looking ahead: why Python next?
You may have hit Blockly's limits today — big programs get unwieldy, and some ideas are just faster to type than to drag. That's exactly why the next phase moves to Python. The good news: it's the same concepts you already know — loops, functions, parameters — just written as text.
Moving from Blockly to Python next lesson mostly means…
Wrap-up
- What's the debugging loop? (Predict → test → observe → adjust.)
- Why break a big program into functions? (Easier to build, test, and fix.)
- Which Module 1 concept will you lean on most in Python? (Your call — loops, functions, and parameters all carry over.)