Create an online weather dashboard which you can view anywhere and let you monitor and record local temperature and humidity. All will be done with simple block program - and can be completed by novice developers and students.
Step 1. MaterialsWe are using Arduino UNO with an ObjectBlocks Shield Prime - which embeds a ESP32 for WiFi and bluetooth access. Stacked on top of Arduino UNO makes Arduino wireless enabled.
Besides Arduino UNO and ObjectBlocks Shield Prime, we will be using DHT 11 module for temperature and humidity, 7-segment LED display to show temperature and a servo to display humidity.
Step 2. AssemblingWe will mount DHT 11, 7-segment LED display and servo onto 3 surfaces of a cardboard box using cable-ties (we prefer using cable ties as the sensors can be removed anytime).
DHT11 consists of 3 pins which are GND, DATA and VCC respectively. Connecting it to digital pin 2.
7-Segment LED display consists of 4 pins: VCC, GND, SCL and SDA. Connecting them to corresponding pin in I2C.
Servo connects to pin 9 (with brown cable being GND).
Once wired, fold up the cardboard box and plug in power to Arduino.
Log into ObjectBlocks Platform (www.objectblocks.cc). Create a new Project and program with read temperature (DHT11) and set 7-segment display (TM1650) commands to get the temperature and display the temperature to 7-segment display. Download the program to Arduino / ObjectBlocks via WiFi.
First we need to set the servo back to 180 degree before we put the servo horn pointing upward. Then put the paper dial on top of servo horn.
Then we use read humidity (DHT11) command, servo and map function to turn the servo based on the humidity. Note that map function is to map from 0 - 100% to 180 to 0 degrees.
Before creating dashboard, we need to create a couple channels in ObjectBlocks. Channels are the cloud storage for Arduino / ObjectBlocks to store the numbers, before forwarding to the dashboard.
Update the program to send temperature and humidity data to channels in 1-second interval.
Create a dashboard to display the text and line charts for real-time information. Note that the data can be recorded, and dashboard are shareable.
Comments