Window Alarm

When windows are open, heat can escape. But fresh air is nice, even in the cold. We don’t want alarms going off just because a window is open. We just need to make sure that the window isn’t open for too long.

We can use the temperature sensor from Mission 17 and the door sensor from Mission 8 together to accomplish this mission.


We want the alarm to go off if the window is open and the temperature in the house has gone down since the last two readings.




Figure 20.1    Window set up with tinfoil.

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 live online training, plus books, videos, and digital content from nearly 200 publishers.