🚨 News Alert: V2.8.2 SD Card Release! – Piper

🚨 News Alert: V2.8.2 SD Card Release!

Summary

We have found a bug in our V2.8.1 which was released with our Piper Computer Kit V4 with the Raspberry Pi 4 microcomputer. If you have a kit with this microcomputer, you should upgrade to the V2.8.2 software. You can do this either directly from your Computer Kit or by reflashing your SD card. If you're curious about the bug and how we fixed it, read on!

Introduction

In late 2021, we introduced the new Piper Computer Kit V4 with the Raspberry Pi 4 Model B, the latest in microcomputers from Raspberry Pi. With more supply chain availability to support our customers, this new microcomputer with its faster processor, 4 USB ports, micro-HDMI connections, and USB-C charging became our newest Piper Computer Kit platform. We developed the Piper Computer Kit V4 to be compatible with three different Raspberry Pi microcomputer models: the Raspberry Pi 3 Model A+ (V4A), Raspberry Pi 3 Model B+ (V4B), and the Raspberry Pi 4 Model B+ (V4). We explain the different versions here. 

However, the new hardware of the Raspberry Pi 4 also came with new software. Raspberry Pis require Raspbian operating systems (OS) that are Linux-based. Funnily enough, they’re all named after Toy Story characters, and in the change from the Pi 3 to the Pi 4, a new requirement for the OS was released. This was in part because the Raspberry Pi 4 includes a bunch of new things on the chip (new microHDMI port, more USB ports, new video chip, etc.) that required a new software OS to be able to use. So instead of Stretch, the Pi 3 OS, we had to upgrade to Buster for the Rasbperry Pi 4. Our incredible developers were able to get the Piper software ported over and we went into production in late 2023 with the Piper Computer Kit V4 with the Raspberry Pi 4.

How Did We Figure This Out?

We had been recieving a few customer service reports of a specific level of Piper StoryMode -- Funky Fungi -- not working. Thanks to some incredible students (and our favorite honorary beta-testers) over at TechItUp.us, we identified the scope of the bug, namely that PiperCode was also not working as expected. When this bug was reported to us, we immediately started by trying to reproduce the errors — our team played through every PiperCode lesson and figured out the scope of the bug itself.

We found that lessons which required PiperCode pushing output (LEDs turning on, sound, etc.) were working; however lessons which detected inputs (button presses) were not. We tested whether it was because of particular pins, so we plugged buttons into GPIO 26 instead of 37, etc. and added print statements in the code to see if we could figure out where the errors were happening. Like our Techitup beta testers, we would sometimes see that the dynamic view would flicker for a second before it stopped working. Our developer, Matt Matz, uncovered the issue was in something called the HAL.

What is the HAL?

The HAL, or hardware abstraction layer, is a software subsystem that interfaces with the hardware that is plugged in. Simply put, it’s the thing in our Piper software that tells StoryMode or PiperCode when a button is pressed or to light up an LED or all the other fun gadgets you build and use during the experience. You probably found that you built a button according to the instructions in PiperCode and it didn’t detect that you were pressing the button — that’s because the HAL in our software isn’t processing the information that a button was pressed correctly or reliably.

What Doesn't Work in V2.8.1?

While StoryMode and PiperCode use some shared HAL elements, PiperCode’s HAL broke when it comes to inputs. Essentially, you may have built a circuit perfectly with a button that completes a circuit from GPIO 37 to ground when pressed, and for some reason the HAL is getting that information and then ignoring it. Instead of doing the things it’s supposed to do in the software (i.e., change a number in the console in Tally, trigger an alarm sound in Siren, etc.), it does nothing. The HAL is pushing information out correctly, so if you connect an LED in the circuit from GPIO 37 to ground, and write code to blink the light, it will work. But the connection between “listening” for a circuit to be completed and then doing an action is broken in the HAL.

What Was the Fix?

We rewrote the faulty parts of the HAL to correct these issues and tested it to ensure functionality. We also introduced a few new bug fixes into V2.8.2 including fixes in the self-repair tool, and the addition of relevant bookmarks to streamline the release of future communications, and more.

How Can you Get the Fix?

We have created three ways you can upgrade to V2.8.2.

(Option 1) If you would like to directly install the patch to your Piper Computer Kit, connect your Piper Computer Kit to wifi and follow the instructions on our Piper Computer Kit Announcements Page (May 9) to download. 

(Option 2) If you have a computer and microSD card reader, you can also reflash your SD card to upgrade to V2.8.2. Follow our Instructions on How to Update your SD Card.

(Option 3) If you'd prefer a replacement SD card, please email us at hi@playpiper.com to exchange your card.

What Did We Learn?

We have a number of learnings around our We’re making sure to incorporate “incorrect builds” and “builds over time” into our testing. We're also excited to launch our announcements page which is incorporated into the Piper Computer Kit home page bookmarks to make rolling out over-the-air changes easier.