Session 19: Finding and fixing faults
Learning outcomes
- Match a symptom to a fault class
- Write a fault inventory before changing code
- Fix compile faults one message at a time
- Explain capitalisation, semicolon, brace, = versus == and pin-mode faults
Kit and components
- Uno, push button, breadboard, onboard LED, lab PC
Pre-reading about 20 min
Students read these on their phones before class. They are listed on the student Before class page.
Session plan
- 0:0010 minRecap
Quiz: evidence and test tables
- 0:1020 minDemo
Symptom first
Project the symptom table from Code Along chapter 9. Show one fault of each class and ask the class to name it before revealing the fix.
- 0:3055 min
- 1:2525 minBuild
Practice inventory on the bench
Students download the practice faulty sketch from the Practical Assessments page, write a fault inventory on paper, then repair it and demonstrate it on the bench.
- 1:5010 minWrap-up
Assessment briefing
Conditions for S20, what to bring, and how the grid is marked.
Checkpoint: ready to move on?
Students pass Six faults, five classes and have a written fault inventory for the practice sketch that names all five classes.
Extension for fast finishers
Plant a fault in a partner's sketch and time how long each of you takes to find it.
Catch-up path
Work through the fault classes table with hints open, saying the class aloud before each fix.
Homework and practice
Revise the five fault classes.
Facilitator notes
- The practice sketch is not the assessment sketch. Keep the door-bell sketch out of sight until S20.
- Eight-week version (S21 dropped): do not fold all of S21's stations in. Take 10 minutes from the Code Along block for a facilitator demo of the hardware fault sequence - power, then signal, then software - at two prepared stations, such as a split rail and a reversed LED. Set The button is ignored and Right code, wrong pin (Code Along 9.4 and 9.5) as homework instead of class work.
- Fault-finding lesson: Multimeter setup and safety, How to measure DC voltage on an Uno and Continuity and resistance (power off) are reference only for students who already know their meters. Students who are unsure read them before S21.