In this lesson
See the finished machine before you build any of it, and learn the three behaviours you are working towards.
Video by Lee Curiosity on YouTube. Watch it, then come back to the notes below.
What your robot will do
| Behaviour | What it means | Where you build it |
|---|---|---|
| Follow a line | Stays on black tape on a light floor | Modules 3 and 5 |
| Corner without wobbling | Slows the correction as it settles | Module 5 (the D term) |
| Stop for an obstacle | Sees an object ahead and holds | Modules 3 and 6 |
What to watch for in the video
- The sensors are in front of the wheels. Watch where they are mounted; it matters more than the code.
- The robot overshoots on the first run. That wobble is what module 5 removes.
- The wiring is not ours. Use our pin map in module 6 — the sketch in this course assumes it.
The loop you are really building
Every self-driving machine, from this robot to a car, runs the same three steps a few dozen times a second:
- Sense — read where the line is, and whether anything is in the way.
- Decide — turn that reading into a correction.
- Act — set each wheel's speed.
Nothing in this course is magic. If a step behaves oddly, you can print the numbers from the step before it and see exactly why.
Before the next lesson
Open your kit box and put it on the desk. The next lesson is a part-by-part check, and it goes faster with everything in front of you.