Practical 6B - Grove Base HAT
Practical 6B - Grove Base HAT
Objective
Further understand Raspberry Pi, Grove Pi module and sensor features.
Procedure
- Connect Grove - Ultrasonic Ranger to port D5, Grove - Relay to port D16 of Base Hat.
- In Thonny IDE, create a new python file, named “test04b.py”. Type the following code in
your test05b.py
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)
* Clue: refer to how relay works, and you may need another relay to do it.
BAIT2123 INTERNET OF THINGS Jul 2024
Step 2: Test LCD & Digital Temperature and Humidity (DHT) Sensor
- Connect Grove - 16*2 LCD to I2C port,Grove - Temperature and Humidity Sensor to
port D5.
- In Thonny IDE, create a new python file, named “test06b.py”. Type the following code in
your test06b.py
Task 2: Add LED light and buzzer to indicate the temperature and humidity values in
alarming levels (example: humidity value > 80%).