Giter VIP home page Giter VIP logo

esp8266-tmp102's Introduction

ESP8266-TMP102

I started a project to read the temperature from a TMP102 sensor from Sparkfun (my version has been retired, but the new one is essentially the same) and publish it to my OpenHAB server via MQTT over WiFi.

OpenHAB is a great, open source, home automation appplication with plugins to interface with just about anything. Among them is support for MQTT, a lighweight message bus framework that seems ideal for smart devices to talk to each other over WiFi in a way that is a bit more robust than simple socket connections. I encourage anyone interested in "connecting" their home to check out OpenHAB.

The TMP102 uses an I2C connection with some specific addressing. Fortunately, both MQTT and I2C libraries are compiled into the latest NodeMCU firmware - I really just had to write a little MQTT code and pilfer some I2C communication code from [email protected] (which I found in the BMP085 module under the LUA firmware project: https://github.com/nodemcu/nodemcu-firmware), and wire the SDA and SCL pins to GPIO14 and 12, respectively.

The resulting code is hosted here for the benefith of other hobbyeits.

One more thing - apparently LUA is integer-based (lame!) and this messed up my conversions to Centigrade. I had to download and flash a floating-point-capable firmware image (nodemcu_float_0.9.6-dev_20150406.bin) from https://github.com/nodemcu/nodemcu-firmware/releases.

More about the effort, and the nuances of prototyping with inexpensive ESP8266 modules can be found on my blog: https://austinlightguy.wordpress.com/2015/04/28/esp8266-update/

esp8266-tmp102's People

Contributors

acoulson2000 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.