MISSION 10

Cookie Jar Protector

Cookies are important; cookies are precious. Let’s create an alarm to keep them safe.

You could use the same code and setup from Mission 8 here. What I find, though, is that people spot the tinfoil and know that the alarm is there. In this mission, we create an alarm that’s invisible until it’s too late, and the perps are caught!

I keep my cookies in a solid jar, none of that see-through nonsense. “Out of sight, out of mind” is my motto when it comes to guarding cookies. This means that when the cookies are safe, it’s dark. When someone has opened the cookie lid, it’s bright. We’re also going to add an extra level of security with each device: a compass sensor for the micro:bit and a sound level sensor for the ...

Get Save the World with Code: 20 Fun Projects for All Ages Using Raspberry Pi, micro:bit, and Circuit Playground Express now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.