thanks a loot!! i use DHT12 Esp8266 (D1Mini) OneWire conections & blynk :
//
//in blynk app use label value V0 and V1 for read data
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT12.h>
#include <Wire.h> //The DHT12 uses I2C comunication.
DHT12 dht12(D4, true);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "***********";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "*********";
char pass[] = "********";
BlynkTimer timer;
void myTimerEvent() {
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(V9, millis() / 1000);
float tmp = dht12.readTemperature();
float hum = dht12.readHumidity();
Serial.printf("Temperatura: %2.2f*C Wilgotnosc: %0.2f%%\r\n", tmp, hum);
Blynk.virtualWrite(V0, tmp);
Blynk.virtualWrite(V1, hum);
}
void setup() {// Debug console
Serial.begin(9600);
dht12.begin();
Blynk.begin(auth, ssid, pass);
timer.setInterval(2000L, myTimerEvent);}
void loop() {Blynk.run();timer.run(); // Initiates BlynkTimer}
Hi…you mention “-127 on Blynk” but this is nothing to do with Blynk. -127 is the default reading you get from a DS18B20 when you haven’t set it up correctly.So the way to proceed is to get the sensor working without Blynk and then Blynkify it. The internet has hundreds if not thousands of pages on the DS18B20.
Maintaining a repository (or site or forum) is a lot like tending to a garden - it requires constant care and attention to keep it thriving. If you're a skilled gardener (or coder!) and want to help keep our repository blooming, we'd love to have you on board! We're also looking for talented writers and forum moderators to help us grow our community. Interested in joining our team? Don't hesitate to reach out and let us know how you can contribute!
Are you a fan of electronics or programming? Share your knowledge with others, write a simple tutorial or how to make a great project Contact me: share_your_ideas@mischianti.org