jessedc / esp8266WiFiTmpSensor

Using the ESP8266 and Adafruit MCP9808 to log the temperature to thingsspeak

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Esp8266 WiFi Temperature Sensor

A basic sketch showing how to use the ESP8266 with the Adafruit MCP9808 to log the ambient temperature to thingspeak.com

Goals

The goal of this sketch is to report the ambient temperature to a remote/IOT server. As a bonus is it easy to also send the WiFi signal strength.

This sketch simply demonstrates basic WiFi and HTTP usage of the ESP8266 as well as a simple I2C sensor. The MCP9808 library is built for Arduino but works fine running on ESP8266.

Outcomes

The micro-controller and sensor will report the ambient temperature of a small solar storage project. The live data generated from this sketch can be seen here.

This is a rudimentary first pass of installing the sensor with blu-tack.

Hardware

Prerequisites

Setup

Unfortunately this is not a tutorial, if you've already got your ESP8266 running from the Arduino IDE there's nothing much else you need to do to run this sketch.

  • Get your IDE setup and running
  • Install the Adafruit library, then install this library into your Arduino library directory
  • Copy the included Settings.example.h to Settings.h and set your appropriate WiFi and Thingspeak settings.

References

About

Using the ESP8266 and Adafruit MCP9808 to log the temperature to thingsspeak

License:MIT License


Languages

Language:C++ 92.8%Language:C 7.2%