Difference between revisions of "Open Source WIFI Weather Station System.(ESP8266 connected to Blynk)"
From Microduino Wiki
(→Outline) |
(→Principle of the Experiment) |
||
Line 65: | Line 65: | ||
==Principle of the Experiment== | ==Principle of the Experiment== | ||
− | This Weather Station | + | This Weather Station collects the following: |
− | *Temperature and humidity | + | *Temperature and humidity with a [[Microduino-Temp&Hum]] |
− | *Light intensity | + | *Light intensity with a [[Microduino-Light]] |
− | *Air quality | + | *Air quality with a [[Microduino-Air Quality]] |
− | *PM2.5 | + | *PM2.5 with a GP2Y1010AU0F module. |
− | * | + | *Uses a [[Microduino-Core+]] to analyze and process sensor data. |
− | *Display on [[Microduino-OLED]] | + | *Display data on a [[Microduino-OLED]] |
− | *Connect the Weather Station with Blynk via [[Microduino-WIFI(ESP)]] | + | *Connect the Weather Station with Blynk via a [[Microduino-WIFI(ESP)]] |
− | *Each sensor connects with [[Microduino-Sensorhub]] | + | *Each sensor connects with the [[Microduino-Sensorhub]] |
[[File:Wifistationtheory.jpg||600px|center]] | [[File:Wifistationtheory.jpg||600px|center]] | ||
Revision as of 18:53, 17 April 2018
ContentsOutline
Introduction:
Bill of MaterialMicroduino Equipment
Other Equipment
Principle of the ExperimentThis Weather Station collects the following:
Get and Configure BlynkNext, we'll learn how Microduino interacts with Blynk through the configuration process of the Weather Station. Getting Started with Blynk
Add Configuration Items
The corresponding code at the Microduino Client is: void senTempHumi() {
am2321.read();
float sensor_tem = am2321.temperature / 10.0;
float sensor_hum = am2321.humidity / 10.0;
Blynk.virtualWrite(V2, sensor_tem);
Blynk.virtualWrite(V3, sensor_hum);
oled(sensor_tem, sensor_hum, sensor_light, sensorPM25, Sensor_etoh);
}
The frequency of the timer can be achieved by codes below: void senTempHumi() {
SimpleTimer temHumtimer;
temHumtimer.setInterval(2000L, senTempHumi);
}
The corresponding code at the Microduino Client is: BLYNK_READ(V6) {
Blynk.virtualWrite(V6, sensorPM25);
}
The corresponding code at the Microduino Client is: BLYNK_READ(V4) {
sensor_light = map(analogRead(A0), 0, 1023, 0, 255);
Blynk.virtualWrite(V4, sensor_light);
}
The corresponding code at the Microduino Client is: BLYNK_READ(V5) {
Sensor_etoh= map(analogRead(A2), 0, 1023, 0, 30);
Blynk.virtualWrite(V5, Sensor_etoh);
}
Program DownloadWeather Station Code: ESP8266BlynkWeatherStation Programming
Hardware Buildup
Notes
|