Skip to Main Content
Save the World with Code: 20 Fun Projects for All Ages Using Raspberry Pi, micro:bit, and Circuit Playground Express
book

Save the World with Code: 20 Fun Projects for All Ages Using Raspberry Pi, micro:bit, and Circuit Playground Express

by Lorraine Underwood
April 2020
Intermediate to advanced content levelIntermediate to advanced
224 pages
6h 2m
English
McGraw-Hill Education TAB
Content preview from Save the World with Code: 20 Fun Projects for All Ages Using Raspberry Pi, micro:bit, and Circuit Playground Express

MISSION 18

Temperature Monitor

A lot of energy is created, spent, and wasted on heating our homes. Don’t get me wrong, we need heat, and I love a nice cosy house. Sometimes, though, my house is too hot, and I’m wasting energy. Let’s set up a temperature sensor to get an idea of what temperature your house actually is.

Instead of displaying the current temperature, let’s record the temperature every hour and store it in an array. Then we can do some science with it!

ARRAY

An array is like a list. You can store numbers in an array and pull them out later. So instead of having variables temperature1, temperature2, and temperature3, we have an array called temperatures that stores all those numbers inside it. The great thing about an array in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Science and Engineering Projects Using the Arduino and Raspberry Pi: Explore STEM Concepts with Microcomputers

Science and Engineering Projects Using the Arduino and Raspberry Pi: Explore STEM Concepts with Microcomputers

Paul Bradt, David Bradt
Card Games by Thiagi: A User's Guide

Card Games by Thiagi: A User's Guide

Sivasailam Thiagi Thiagarajan

Publisher Resources

ISBN: 9781260457605