SO YES. Now is sketch working good
. But i dont know are all things in the sketch necessarily??float temp, hum;
?bool SI7021_present = true;
?SimpleTimer timer;
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
#include <Wire.h>
#include <SI7021.h>
float temp, hum;
bool SI7021_present = true;
#define I2C_SCL 12 // Barometric Pressure Sensor (BMP085)
#define I2C_SDA 13
SI7021 sensor;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = ""; // Put your Auth Token here. (see Step 3 above)
SimpleTimer timer;
void setup()
{
Wire.begin();
sensor.begin(SDA,SCL);
Wire.begin(I2C_SDA, I2C_SCL);
Serial.begin(9600); // See the connection status in Serial Monitor
Blynk.begin(auth, "", ""); //insert here your SSID and password
timer.setInterval(1000L,sendUptime);
}
void sendUptime()
{
int temperature = sensor.getCelsiusHundredths()/100;
int humidity = sensor.getHumidityPercent();
Blynk.virtualWrite(5, temperature); // virtual pin
Blynk.virtualWrite(6, humidity); // virtual pin
}
void loop()
{
Blynk.run();
timer.run();
}
Thanks.
