Difference between revisions of "Open Source WiFi Weather Station"
From Microduino Wiki
(→Principle of the Experiment) |
(→Get and Configure Blynk) |
||
Line 85: | Line 85: | ||
===Add Configuration Items === | ===Add Configuration Items === | ||
− | *You can scan the two-dimension code below to get Weather Station APP. | + | |
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | **You can scan the two-dimension code below to get Weather Station APP. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkWeatherStationLink.png||300px|center]] | [[File:BlynkWeatherStationLink.png||300px|center]] | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
*Also, you can make your own one. | *Also, you can make your own one. | ||
*In this case, you can click the panel and call out '''WIDGET BOX''', on which you can see many choices. | *In this case, you can click the panel and call out '''WIDGET BOX''', on which you can see many choices. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting3.png||200px|center]] | [[File:BlynkSetting3.png||200px|center]] | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
*Add '''Value Display''' item and name "temperature" to display '''Temperature value''' acquired. | *Add '''Value Display''' item and name "temperature" to display '''Temperature value''' acquired. | ||
*Select V2 on '''INPUT'''; Choose PUSH on '''READING FREQUENCY''', which indicates the temperature is sent from the Weather Station and the frequency is controlled by Microduino Client. | *Select V2 on '''INPUT'''; Choose PUSH on '''READING FREQUENCY''', which indicates the temperature is sent from the Weather Station and the frequency is controlled by Microduino Client. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting4.png||200px|center]] | [[File:BlynkSetting4.png||200px|center]] | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
The corresponding code at the Microduino Client is: | The corresponding code at the Microduino Client is: | ||
+ | |width="50%" valign="top" align="left"| | ||
<source lang="cpp"> | <source lang="cpp"> | ||
void senTempHumi() { | void senTempHumi() { | ||
Line 105: | Line 133: | ||
} | } | ||
</source> | </source> | ||
− | *The setting of the humidity is similar with that of temperature; Set '''INPUT''' as V3 and send it through a timer function " senTempHumi()". | + | |} |
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * The setting of the humidity is similar with that of temperature; Set '''INPUT''' as V3 and send it through a timer function " senTempHumi()". | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting5.png||200px|center]] | [[File:BlynkSetting5.png||200px|center]] | ||
− | The frequency of the timer can be achieved by codes below: | + | |} |
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * The frequency of the timer can be achieved by codes below: | ||
+ | |width="50%" valign="top" align="left"| | ||
<source lang="cpp"> | <source lang="cpp"> | ||
void senTempHumi() { | void senTempHumi() { | ||
Line 114: | Line 158: | ||
} | } | ||
</source> | </source> | ||
− | *Set PM2.5's '''INPUT''' as V6, '''READING FREQUENCY''' as 5s, which represents frequency of the acquired PM2.5 data. | + | |} |
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * Set PM2.5's '''INPUT''' as V6, '''READING FREQUENCY''' as 5s, which represents frequency of the acquired PM2.5 data. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting6.png||200px|center]] | [[File:BlynkSetting6.png||200px|center]] | ||
− | The corresponding code at the Microduino Client is: | + | |} |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * The corresponding code at the Microduino Client is: | ||
+ | |width="50%" valign="top" align="left"| | ||
<source lang="cpp"> | <source lang="cpp"> | ||
BLYNK_READ(V6) { | BLYNK_READ(V6) { | ||
Line 122: | Line 184: | ||
} | } | ||
</source> | </source> | ||
− | *Similarly, set the '''INPUT''' of the Light Sensor as V4 and the frequency is to get value every 3s. | + | |} |
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * Similarly, set the '''INPUT''' of the Light Sensor as V4 and the frequency is to get value every 3s. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting7.png||200px|center]] | [[File:BlynkSetting7.png||200px|center]] | ||
− | The corresponding code at the Microduino Client is: | + | |} |
+ | |||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * The corresponding code at the Microduino Client is: | ||
+ | |width="50%" valign="top" align="left"| | ||
<source lang="cpp"> | <source lang="cpp"> | ||
BLYNK_READ(V4) { | BLYNK_READ(V4) { | ||
Line 131: | Line 209: | ||
} | } | ||
</source> | </source> | ||
− | *The '''INPUT''' of the methane gas is V5 and the frequency is to get value every 5s. | + | |} |
+ | |||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * The '''INPUT''' of the methane gas is V5 and the frequency is to get value every 5s. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting8.png||200px|center]] | [[File:BlynkSetting8.png||200px|center]] | ||
− | The corresponding code at the Microduino Client is: | + | |} |
+ | |||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * The corresponding code at the Microduino Client is: | ||
+ | |width="50%" valign="top" align="left"| | ||
<source lang="cpp"> | <source lang="cpp"> | ||
BLYNK_READ(V5) { | BLYNK_READ(V5) { | ||
Line 140: | Line 236: | ||
} | } | ||
</source> | </source> | ||
− | *See "Button Setting" next. | + | |} |
− | *Set '''OUTPUT''' as V6 and '''MODE''' as SWITCH, meaning each time you press the button, you can switch electric level of the D6 pin at the Microduino Client. | + | |
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
+ | * See "Button Setting" next. | ||
+ | * Set '''OUTPUT''' as V6 and '''MODE''' as SWITCH, meaning each time you press the button, you can switch electric level of the D6 pin at the Microduino Client. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting9.png||200px|center]] | [[File:BlynkSetting9.png||200px|center]] | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
*For more intuitive data display, you can add one or more '''History Graph'''. | *For more intuitive data display, you can add one or more '''History Graph'''. | ||
*Can be set as data graph displaying V2 and V3. (can achieve four data display at most.) | *Can be set as data graph displaying V2 and V3. (can achieve four data display at most.) | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting10.png||200px|center]] | [[File:BlynkSetting10.png||200px|center]] | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
*The second '''History Graph''' can be used for displaying V6, PM2.5. | *The second '''History Graph''' can be used for displaying V6, PM2.5. | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting11.png||200px|center]] | [[File:BlynkSetting11.png||200px|center]] | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| border="0" cellpadding="10" width="100%" | ||
+ | |- | ||
+ | |width="50%" valign="top" align="left"| | ||
*Finally, your phone panel turns into this: | *Finally, your phone panel turns into this: | ||
+ | |width="50%" valign="top" align="left"| | ||
[[File:BlynkSetting12.png||200px|center]] | [[File:BlynkSetting12.png||200px|center]] | ||
+ | |} | ||
==Program Download== | ==Program Download== |
Revision as of 00:51, 29 March 2016
ContentsOutline
Instroduction:
Bill of MaterialMicroduino Equipment
Other Equipment
Principle of the ExperimentThis Weather Station can detect data including:
Get and Configure BlynkNext, we'll learn how Microduino interacts with Blynk through the configuration process of the Weather Station. Get Blynk Phone Client
Add Configuration Items
Program DownloadWeather Station Code: ESP8266BlynkWeatherStation Programming
Hardware Buildup
Notes
|