I was using the example of “Arduino ethernet” and the buttons on blynk app usually They used the outputs of the Arduino. then I added some instructions for using the dht11 sensor, the buttons do not work anymore.
Anyone know how I can fix this?
My cod is this:
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space #include < SPI.h> #include < Ethernet.h> #include < BlynkSimpleEthernet.h> #include < dht.h> #define dht_dpin A0 //Pino DATA do Sensor ligado na porta Analogica A1
dht DHT; //Inicializa o sensor
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxx”;
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
Blynk.run();
// You can also specify server.
// For more options, see BoardsAndShields/Arduino_Ethernet_Manual example //Blynk.begin(auth, “your_server.com”, 8442); //Blynk.begin(auth, IPAddress(192,168,1,100), 8888);
}
void loop()
{
Blynk.run();
{
DHT.read11(dht_dpin); //Lê as informações do sensor
float t = DHT.temperature;
char buf[5];
dtostrf(t, 3,0, buf);
Blynk.virtualWrite(V1, String(buf) + “℃”);
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space #include < SPI.h> #include < Ethernet.h> #include < BlynkSimpleEthernet.h> #include < dht.h> #include < SimpleTimer.h> #define dht_dpin A0 //Pino DATA do Sensor ligado na porta Analogica A1
dht DHT; //Inicializa o sensor
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space #include < SPI.h> #include < Ethernet.h> #include < BlynkSimpleEthernet.h> #include < dht.h> #include < SimpleTimer.h> #define dht_dpin A0 //Pino DATA do Sensor ligado na porta Analogica A1
dht DHT; //Inicializa o sensor