GrovePi Lesson: Kick it Up a Temp-Humidity Sensor

How are temperature and humidity sensors used in an electronic device?

This lesson introduces the Temp-Humidity sensor and how to use it as an input with the GrovePi board. We use Scratch commands to obtain the data from the sensors and display the room values for the temperature and humidity on the screen. We also learn more about the math operators and Boolean commands as we use them to convert the temperature from Celsius to Fahrenheit. Then we connect the LCD display and show the temperature and humidity values on the display. Finally we create our own code to use the temperature and humidity sensor in our project. The concept videos provide scientific information about temperature, heat, heat energy, humidity, and how humidity affects plant growth.

Time to complete:

  • 60 to 90 min (activities are 5 to 10 minutes each) 
  • Optional Exercises are additional 4 to 6 hrs (each is 30 min to 1 hr)

What We Will Learn

  1. Understand and use technology systems: Raspberry Pi, Grove Pi, and Temp-Humidity Sensor.
  2. Connect and use the Temp-Humidity sensor module with the GrovePi kit.
  3. Write a Scratch program, test that it works, and debug it.
  4. Create programs to detect temperature, detect humidity, convert temperature from Celsius to Fahrenheit, and display the temperature and humidity on the LCD display.
  5. Learn about how temperature and humidity affect weather and plant growth.
  6. Collaborate with peers and others by working in project teams and participating in group active learning activities.
  7. Optional – complete exercises to further explore temperature and humidity sensors and integrate them into your engineering design.

What You Need

  • Raspberry Pi and GrovePi assembled together with SD card (from Getting Started lesson)
  • RaspberryPi setup (from Getting Started lesson) and Scratch Programming Environment
  • Knowledge of Scratch programming (from prior lessons)
  • Headset or speakers plugged into Raspberry Pi
  • Personal USB thumb or flash drive to save programs
  • From GrovePi Kit: Temp-humidity module, LCD display module, and 2 connector cables


What to Do 

  • Open the Worksheet document.  The worksheet contains a checklist for you to check off items as you complete them, some questions to answer as you work through the activities, and optional Exercises.
  • Watch the concept videos and review the vocabulary words.
  • Then view the following items and complete the assigned activities and optional exercises in the Worksheet.  Give the filled-out worksheet to your instructor at the completion of this lesson.



WORKSHEET (Google Doc)

CONCEPTS 1 (3 min)

CONCEPTS 2 (4 min)

CONCEPTS 3 (6 min)





Overview (8 min)

Activity 1 (3 min)

Activity 2 (2 min)

Activity 3 (3 min)

Activity 4 (3 min)

Activity 5 (2 min)

Video Script

Step by Step



Resource links

Copyright 2017 Interactive Media Publishing, All rights reserved