hadif azli
/
TEST123
BLYNK TEST
WiFiBlynk.h@2:6cd3b0947188, 2016-06-15 (annotated)
- Committer:
- lixianyu
- Date:
- Wed Jun 15 03:08:40 2016 +0000
- Revision:
- 2:6cd3b0947188
- Parent:
- 0:d8f4c441e032
- Child:
- 3:4cd9171ba989
PM2.5????????5V??????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lixianyu | 0:d8f4c441e032 | 1 | #if 0 |
lixianyu | 0:d8f4c441e032 | 2 | #include <ESP8266_HardSer.h> |
lixianyu | 0:d8f4c441e032 | 3 | #include <BlynkSimpleShieldEsp8266_HardSer.h> |
lixianyu | 0:d8f4c441e032 | 4 | #include <SimpleTimer.h> |
lixianyu | 0:d8f4c441e032 | 5 | |
lixianyu | 0:d8f4c441e032 | 6 | // Set ESP8266 Serial object |
lixianyu | 0:d8f4c441e032 | 7 | #define EspSerial Serial1 |
lixianyu | 0:d8f4c441e032 | 8 | |
lixianyu | 0:d8f4c441e032 | 9 | ESP8266 wifi(EspSerial); |
lixianyu | 0:d8f4c441e032 | 10 | |
lixianyu | 0:d8f4c441e032 | 11 | void senTempHumi() |
lixianyu | 0:d8f4c441e032 | 12 | { |
lixianyu | 0:d8f4c441e032 | 13 | Blynk.virtualWrite(V2, sensor_tem); |
lixianyu | 0:d8f4c441e032 | 14 | Blynk.virtualWrite(V3, sensor_hum); |
lixianyu | 0:d8f4c441e032 | 15 | } |
lixianyu | 0:d8f4c441e032 | 16 | |
lixianyu | 0:d8f4c441e032 | 17 | BLYNK_READ(V4) |
lixianyu | 0:d8f4c441e032 | 18 | { |
lixianyu | 0:d8f4c441e032 | 19 | Blynk.virtualWrite(V4, sensor_light); |
lixianyu | 0:d8f4c441e032 | 20 | } |
lixianyu | 0:d8f4c441e032 | 21 | BLYNK_READ(V5) |
lixianyu | 0:d8f4c441e032 | 22 | { |
lixianyu | 0:d8f4c441e032 | 23 | Blynk.virtualWrite(V5, Sensor_etoh); |
lixianyu | 0:d8f4c441e032 | 24 | //BLYNK_PRINT.println(Sensor_etoh); |
lixianyu | 0:d8f4c441e032 | 25 | } |
lixianyu | 0:d8f4c441e032 | 26 | |
lixianyu | 0:d8f4c441e032 | 27 | BLYNK_READ(V6) |
lixianyu | 0:d8f4c441e032 | 28 | { |
lixianyu | 0:d8f4c441e032 | 29 | Blynk.virtualWrite(V6, sensorPM25); |
lixianyu | 0:d8f4c441e032 | 30 | //BLYNK_PRINT.println(sensorPM25); |
lixianyu | 0:d8f4c441e032 | 31 | } |
lixianyu | 0:d8f4c441e032 | 32 | #endif |