BLYNK TEST

Dependencies:   mbed Blynk

WiFiBlynk.h

Committer:
lixianyu
Date:
2016-06-16
Revision:
3:4cd9171ba989
Parent:
2:6cd3b0947188
Child:
5:8a3cf73d7ed3

File content as of revision 3:4cd9171ba989:


#include "Config.h"
#include "ESP8266_HardSer.h"
#include "BlynkSimpleShieldEsp8266_HardSer.h"
#include "SimpleTimer.h"

Serial EspSerial(D3, D2);//tx, rx
ESP8266 wifi(EspSerial);

void senTempHumi()
{
    Blynk.virtualWrite(V2, sensor_tem);
    Blynk.virtualWrite(V3, sensor_hum);
}

BLYNK_READ(V4)
{
    Blynk.virtualWrite(V4, sensor_light);
}
BLYNK_READ(V5)
{
    Blynk.virtualWrite(V5, Sensor_etoh);
    //BLYNK_PRINT.println(Sensor_etoh);
}

BLYNK_READ(V6)
{
    Blynk.virtualWrite(V6, sensorPM25);
    //BLYNK_PRINT.println(sensorPM25);
}