Lesson Seven

Lesson Seven looks at debugging, problem solving, and using your data. In this lesson you will:

  • Learn about debugging

  • Complete a coding activity

  • Look at data from your Electric Garden and from the Met Service

  • Make comparisons between the data and suggest reasons for differences

Debugging and Problem Solving

Debugging is a way of finding and fixing mistakes that are made when writing and using code. Another term for fixing mistakes is problem solving. Watch the video below about debugging, and work through some of the online problems. Can you help the bee collect the nectar?


Collecting and Comparing Data

Your Electric Garden is gathering information about the conditions in your school vegetable patch. Compare the data that you’ve created with data that you can find online about our local area.

Log in to your Electric Garden and take a look at the graphs. You should be able to see lines on the graph for soil temperature, air temperature, soil moisture, humidity, and light. Change which lines you see using the check boxes in the green box on the right.


Either by making notes in your book or using this worksheet, look at the data you have produced over the past 30 days. Can you identify the following things? ( You may need to zoom in and out of the data)

  • Which day was hottest?

  • Which day was coldest?

  • Can you tell which days it rained?

  • Can you tell what time sunrise and sunset was yesterday?

Head to the Met Service website and search for your town. Make a note of the location of the weather station closest to you. For example, searching for ‘Fairlie’ gives you data from the weather station in Twizel!


Once you find your town, scroll down until you can see weather data from the last 30 days. Identify the following and write them in your book or on your worksheet:

  • Which day was hottest?

  • Which day was coldest?

  • Can you tell which days it rained?

Open timeanddate.com and search for your town. Lots of towns in Aotearoa share their names with places in other parts of the world, so make sure you select Aotearoa! If you cannot find your town, search for the place that the Met Service used. Find the times of sunrise and sunset from yesterday.

Problem Solving with your Data

Can you identify any differences between the data from your Electric Garden and the data from the Met Service and timeanddate.com? Using your problem solving skills from earlier and working with the people around you, suggest reasons why there might be differences. You might want to go out to your garden and check the location of your garden sensor. Think about:

  • How far away from the Met Service weather station are you?

  • Are you in the mountains? Is your Met Service data from the mountains?

  • Is your garden sensor in the sun or shade?

  • Is your garden sensor sheltered or exposed?

  • How often are you watering your garden?

  • How cloudy has it been in the past 30 days?

Thinking about these questions, think about the accuracy of your Electric Garden data. Can you think of any ways to improve the data that you are collecting? Can you think of anything else you would like your Electric Garden to be able to measure?