DHT11 and DHT22

I didn’t dig deep into the feature but it did occasionally tell me "esp8266 " was offline.

I put Blynk.notify("why don't you popup?"); in void setup(), after the connection is set up.

@juncaofish

Like this

while (!Blynk.connect()) {
// Wait until connected
}

// Notify immediately on startup
Blynk.notify(“why don’t you popup?”);

?

Yes! Anything wrong? Hopefully I can fix this.

Code is ok. Did you add notification widget to your dashboard? Your dashboard active?

Yes. I add it and the dashboard is activated. The Mail widget once didn’t work for me. But now it’s OK.
However, I don’t get any luck on Notification widget.
Thanks for your reply.

Ok, than please give me your email so I could check your logs maybe I’ll find something.

1 Like

xxxxxxxxxxxxxx thanks~

@juncaofish

Please remove and add notification widget again. Look like there was problem during push notification initialization. This should fix issue.

Tried. Still no luck. Maybe next upgrade for android app will fix it.

Yes I see that in logs. Could you please send us your device log? It should be something like blynk.log in the root of your SD card. For some reason notifications are not enabled on your device. Maybe this some kind of permissions issue. Very strange.

I’d like to. Does it locate at /sdcard/ . I didn’t find any info or log about blynk app.

When you plug phone via USB there should be root folder of your device and log should be there.

Didn’t find it. There must be something wrong. Maybe I should reinstall the app

I’m using this code - which works but curious why graph shows nothing when connected to virtual pins 0,1 for humidity and temp? The value display and guage work ok.

#include “DHT.h”
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = “0123456789abcdef0123456789abcdef”;

#define DHTPIN 0 // what pin we’re connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE,15);

float h,f;
unsigned long lastmillis = 0;

void readTemp()
{
h = dht.readHumidity();
f = dht.readTemperature(true); // true for deg F
}

void setup() {
Serial.begin(115200);
Serial.println(“DHTxx test!”);

dht.begin();
Blynk.begin(auth, “ssid”, “password”,IPAddress(192,168,1,65));
}

void loop() {
Blynk.run();
if ((millis() - lastmillis) > 2000) {
lastmillis = millis();
readTemp();
}
}

BLYNK_READ(0)
{
Blynk.virtualWrite(0, h);
}

BLYNK_READ(1)
{
Blynk.virtualWrite(1, f);
}

You are also using Android? My Graph Widget doesn’t work either, while IOS works.

There is a bug in Android graph version. It doesn’t work with float. This is already fixed. Will be available in new update in few days. Sorry for inconvenience.

1 Like

Don’t forget about us IOS guys, :wink:

I am investigating obtaining a simple Android for testing purposes though.

Hi all, here is an example for Raspberry Pi.
"Raspberry Pi + Node.js + Blynk App + DHT11/DHT22/AM2302":

1 Like

Hi to all.
Is anyone have example for Intel Edison. Because I was try so many sketches and libraries and didn’t work.
In DHTtester example i have the error:

C:\Users…\Documents\Arduino\libraries\DHT\DHT.cpp: In constructor ‘DHT::DHT(uint8_t, uint8_t, uint8_t)’:
C:\Users…\Documents\Arduino\libraries\DHT\DHT.cpp:18:46: error: ‘microsecondsToClockCycles’ was not declared in this scope
_maxcycles = microsecondsToClockCycles(1000); // 1 millisecond timeout for
^
Error compiling.

Any help :smile: