Last time they made a good start on the software. In the final lesson they'll finish the software, build the hardware and see who's got the fastest reactions!
Students will learn:
Make a note of the best time. This will be useful to share with other teachers, and with future students!
Reference code is included here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Circuit diagrams haven't been included in the final handout as students have already seen and have copies of a button and LED circuit. If they get stuck, you can show them your copy:
They don't get a great representation of reaction time without making multiple measurements (just like in science). Find a way to repeat the test 3 times and make an average before printing a final score.
Now it's time to run the competition! To save time, they'll play a 'sudden death' tournament. If a student loses then they get knocked out.
Ask all pairs to test each other. The winners then play against each other. A class of 30 should only need 5 tests to find the overall winner.
You can ask at the end how to make the competition fairer, as the ways that the students come up with will probably be fairly straight forward to add to our program. For example taking 3 scores and making an average gets rid of the bad luck element.
Pack away the Pi.
Continue from the project started in lesson 4. Students should now have a project description, a circuit diagram and some comments and Python code. The final homework is to write a short presentation on their project.
They should include:
If you want to do another Pi project, you could ask the students to present their work and use the most voted project as the starting point.