April 2020
Intermediate to advanced
224 pages
6h 2m
English
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 ...