MISSION 13

Floor Mat Alarm

For rooms where there are no doors or doors on which we don’t want to put electronics on the outside of, we can create a floor mat alarm. This is perfect if you share a room with a sibling and don’t want him or her on your side of the room. You create a sensor that will set off an alarm if he or she steps on it.

Algorithm

This sensor is basically the opposite of the door and cookie sensors. Rather than breaking the circuit, the circuit is created. It’s Mission 1 with a floor mat instead of you!

If circuit is created

      Set off alarm

What’s very different is the build. The first part of the build is the same for all three devices.

Build

The build is the same for all devices, up to the moment you attach the device. ...

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.