Hello I want some help for my proyect
the problem is that the device disconect when you interact with the widgets.
a simply increase of the temperature makes it disconect
let me know what im doing wrong
define BLYNK_PRINT Serial
include DallasTemperature.h>
include OneWire.h>
include ESP8266WiFi.h>
include BlynkSimpleEsp8266.h>
char auth[] = "***";
char ssid[] = "***";
char pass[] = "***";
define DATO 2 // What digital pin we're connected to
OneWire ourWire (DATO);
DallasTemperature sensors (&ourWire);
BlynkTimer timer;
// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void sendSensor()
{
sensors.requestTemperatures();
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(V3, sensors.getTempCByIndex(0));
Blynk.virtualWrite(V4, sensors.getTempCByIndex(0));
}
BLYNK_WRITE(V1)
{
int buttonState = param.asInt();
digitalWrite(4,buttonState);
}
BLYNK_WRITE(V2){
int buttonState=param.asInt();
analogWrite(3,buttonState);
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
sensors.begin();
timer.setInterval(1000L, sendSensor);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
}
void loop()
{
Blynk.run();
timer.run();
}