Practical 6A - Grove Pi+
Practical 6A - Grove Pi+
Objective
Further understand Raspberry Pi, Grove Pi module and sensor features.
Procedure
1. Connect a Grove Relay to port D2 and the Grove Ultrasonic to port D3.
2. In Thonny Python (ID), click “New” to create a new python file and Save As
“test04.py”. Type the following codes:
Task 1: Modify the hardware circuit to allow relay contact with the buzzer (if no buzzer,
use LED).
Task 2: Adding relay and LEDs on the constructed hardware circuit to allow relay to
control Red and Green Lights (either one side is selected)
BAIT2123 INTERNET OF THINGS Jul 2024
* Clue: refer to how relay works, and you may need another relay to do it.
Step 2: Test RGB LCD Display and DHT (Digital Humidity and Temperature)
1. Connect a Grove DHT to port D7 and the Grove RGB LCD Display to any of the I2C
ports.
2. In Thonny Python (ID), click “New” to create a new python file and Save As
“test05.py”. Type the following codes:
* If your Grove RGB LCD only able to display ½ row of characters (malfunction)
BAIT2123 INTERNET OF THINGS Jul 2024
(8 characters per row), try to indicate the value as “T: 26.3C H:62.7%”
Task 1: Test your temperature and humidity sensor by facing it with a few breaths.
Task 2: Adjust the LCD backlight and add two LED lights to indicate the temperature
and humidity values in alarming levels.