BLYNK TEST

Dependencies:   mbed Blynk

Committer:
lixianyu
Date:
Thu Jun 16 08:08:30 2016 +0000
Revision:
3:4cd9171ba989
Parent:
2:6cd3b0947188
Child:
5:8a3cf73d7ed3
9600?????ESP8266????????115200??ESP8266?????????9600????????????Timer???????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lixianyu 0:d8f4c441e032 1
lixianyu 3:4cd9171ba989 2 #include "Config.h"
lixianyu 3:4cd9171ba989 3 #include "ESP8266_HardSer.h"
lixianyu 3:4cd9171ba989 4 #include "BlynkSimpleShieldEsp8266_HardSer.h"
lixianyu 3:4cd9171ba989 5 #include "SimpleTimer.h"
lixianyu 0:d8f4c441e032 6
lixianyu 3:4cd9171ba989 7 Serial EspSerial(D3, D2);//tx, rx
lixianyu 0:d8f4c441e032 8 ESP8266 wifi(EspSerial);
lixianyu 0:d8f4c441e032 9
lixianyu 0:d8f4c441e032 10 void senTempHumi()
lixianyu 0:d8f4c441e032 11 {
lixianyu 0:d8f4c441e032 12 Blynk.virtualWrite(V2, sensor_tem);
lixianyu 0:d8f4c441e032 13 Blynk.virtualWrite(V3, sensor_hum);
lixianyu 0:d8f4c441e032 14 }
lixianyu 0:d8f4c441e032 15
lixianyu 0:d8f4c441e032 16 BLYNK_READ(V4)
lixianyu 0:d8f4c441e032 17 {
lixianyu 0:d8f4c441e032 18 Blynk.virtualWrite(V4, sensor_light);
lixianyu 0:d8f4c441e032 19 }
lixianyu 0:d8f4c441e032 20 BLYNK_READ(V5)
lixianyu 0:d8f4c441e032 21 {
lixianyu 0:d8f4c441e032 22 Blynk.virtualWrite(V5, Sensor_etoh);
lixianyu 0:d8f4c441e032 23 //BLYNK_PRINT.println(Sensor_etoh);
lixianyu 0:d8f4c441e032 24 }
lixianyu 0:d8f4c441e032 25
lixianyu 0:d8f4c441e032 26 BLYNK_READ(V6)
lixianyu 0:d8f4c441e032 27 {
lixianyu 0:d8f4c441e032 28 Blynk.virtualWrite(V6, sensorPM25);
lixianyu 0:d8f4c441e032 29 //BLYNK_PRINT.println(sensorPM25);
lixianyu 3:4cd9171ba989 30 }