I decided to put the focus of this unit on physical computing, using a computer to control or respond to events in the real world. During the previous rotation in the lab, 5th graders learned to use a breadboard to build circuits using LEDs, buzzers, and buttons. These circuits were battery powered, so the set up was a little different. (That was the first thing I learned in fact, be explicit about the differences between wiring a circuit to a battery and to a Raspberry Pi.)
We started our physical programming adventure with an overview of the Raspberry Pi, paying special attention to how it differs from a "normal" computer. The Raspberry Pi was designed specifically for teaching computer programming and digital making skills to children and comes loaded with a number of programming tools and languages. One of those pre-loaded languages is Scratch. The students are already quite familiar with using the "broadcast" blocks in Scratch to tell stories and control the action of their projects. These same blocks are used to configure and control the GPIO pins that make physical computing possible. I started them off with blinking LEDs and then button operated LEDs. As red and green LEDs blinked to life, the room was filled with surprised gasps and exclamations like, "It worked!". It was one of these beautiful teaching moments when you know for certain that every student is engaged and genuinely excited about what they are doing. After their initial successes, students went wild adding LEDs and tinkering with the blink speed. The final challenge was to build a traffic lights arrangement of LEDS, operated with a button. This is a fairly complicated task, not because the sequencing of the lights is difficult, but because of the large numbers of broadcasts that are needed. I am proud of how the students I have had so far have persevered and succeeded. This part took a day longer than the two that I thought it would take, but that has not been a problem as it allowed the students extra time to experiment with their code.
.From Scratch, we moved on to Python which is text-based, unlike Scratch which uses blocks. I set them essentially the same tasks, blinking LEDs, buttons, and traffic lights, but this time they had to type everything. This took the necessity of careful attention to details to a whole different level. Python is extremely user friendly for students, but syntax and indentation does matter. At first, there many error messages. Once again, I had reason to be proud as my students, albeit with much grumbling about commas and capital letters, stuck to their work and overcame the challenges. Students having an understanding of the two languages also provided an excellent opportunity to compare them to highlight their similarities, and to dig deeper into computer science concepts like abstraction.
The final two days of the unit are a mini project in which students apply what they have learned to another program. The first group created a multiplication quiz game in Scratch with LEDs that light when the player answers, red for an incorrect response, green for the correct one. This the end of the second rotation and the students are just starting these final projects. I am experimenting with giving them a choices of final product. A few selected the multiplication quiz (those with a pronounced preference for Scratch), but most elected to work through a tutorial on programming Minecraft Pi with Python leading up to combining physical computing with events in the Minecraft world. I am so excited to see how these projects turn out, and to see what the next 2 groups achieve.