Skip to content

Instantly share code, notes, and snippets.

View thomasvt1's full-sized avatar

Thomas van Tilburg thomasvt1

View GitHub Profile
@thomasvt1
thomasvt1 / MQTT_ESP8266_temperature_humidity.ino
Created October 12, 2016 17:18 — forked from balloob/MQTT_ESP8266_temperature_humidity.ino
Sketch for the ESP8266 to publish temperature and humidity values received from a DHT22 to MQTT
// Get ESP8266 going with Arduino IDE
// - https://github.com/esp8266/Arduino#installing-with-boards-manager
// Required libraries (sketch -> include library -> manage libraries)
// - PubSubClient by Nick ‘O Leary
// - DHT sensor library by Adafruit
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>