Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Io_moon by
WiFiBlynk.h
00001 #ifdef OPEN_BLYNK 00002 #include "Config.h" 00003 #include "ESP8266_Lib.h" 00004 #include "BlynkSimpleShieldEsp8266.h " 00005 #include "SimpleTimer.h" 00006 00007 Serial EspSerial(D3, D2);//tx, rx 00008 ESP8266 wifi(EspSerial); 00009 00010 void senTempHumi() 00011 { 00012 //pc.printf("Enter senTempHumi(),temp=%f,hum=%f\r\n",sensor_tem, sensor_hum); 00013 Blynk.virtualWrite(V2, sensor_tem); 00014 Blynk.virtualWrite(V3, sensor_hum); 00015 } 00016 00017 void sendLight() 00018 { 00019 //pc.printf("Enter sendLight(),light=%f\r\n", sensor_light); 00020 Blynk.virtualWrite(V4, sensor_light); 00021 } 00022 00023 void sendCH4() 00024 { 00025 //pc.printf("Enter sendCH4(), ch4=%f\r\n", Sensor_etoh); 00026 Blynk.virtualWrite(V5, Sensor_etoh); 00027 } 00028 00029 void sendPM25() 00030 { 00031 //pc.printf("Enter sendPM25(), pm25=%f\r\n", sensorPM25); 00032 Blynk.virtualWrite(V6, sensorPM25); 00033 } 00034 00035 #if 0 00036 BLYNK_READ(V2) 00037 { 00038 Blynk.virtualWrite(V2, sensor_tem); 00039 } 00040 00041 BLYNK_READ(V3) 00042 { 00043 Blynk.virtualWrite(V3, sensor_hum); 00044 } 00045 00046 BLYNK_READ(V4) 00047 { 00048 pc.printf("Enter read V4\r\n"); 00049 Blynk.virtualWrite(V4, sensor_light); 00050 } 00051 BLYNK_READ(V5) 00052 { 00053 pc.printf("Enter read V5\r\n"); 00054 Blynk.virtualWrite(V5, Sensor_etoh); 00055 //BLYNK_PRINT.println(Sensor_etoh); 00056 } 00057 00058 BLYNK_READ(V6) 00059 { 00060 pc.printf("Enter read V6\r\n"); 00061 Blynk.virtualWrite(V6, sensorPM25); 00062 //BLYNK_PRINT.println(sensorPM25); 00063 } 00064 #endif 00065 #endif
Generated on Tue Jul 19 2022 01:01:49 by
1.7.2
