Skip to content

Instantly share code, notes, and snippets.

@Ximik1324
Ximik1324 / blynkDS18B20.ico
Created May 17, 2021 16:33 — forked from structure7/blynkDS18B20.ico
Simple sketch for using the DS18B20 temp sensor on an ESP8266 with Blynk
#include <SimpleTimer.h> // Allows us to call functions without putting them in loop()
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2 // Your ESP8266 pin (ESP8266 GPIO 2 = WeMos D1 Mini pin D4)
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);