ESP8266-DS18S20

From Hackerspace ACKspace
Revision as of 21:52, 3 November 2015 by Xopr (talk | contribs) (set project picture)
Jump to: navigation, search
Project: ESP8266-DS18S20
Featured:
State Completed
Members xopr
GitHub No GitHub project defined. Add your project here.
Description Creating a wireless SpaceAPI-like sensor
Picture
ESP8166-DS18S20-PCB.png

This code is deprecated and had been replaced by the new SpaceAPI's space state

Also, the code is somewhat ugly, but it worked..

synopsis

This sketch provides a webserver-like interface and provides a json file (somewhat compatible with SpaceAPI).

The json will provide the DS18S20 temperature sensor's address and temperature in °C, and will look like:

{
  "sensors":{
    "ext_temp_count":2,
    "temperature":[
      {
        "ext_index":0,
        "value":-127.0,
        "unit":"°C",
        "ext_address":"00112233445566"
      },
      {
        "ext_index":0,
        "value":85.0,
        "unit":"°C",
        "ext_address":"99AABBCCDDEEFF"
      }
    ]
  }
}

Note: the ext_temp_count and ext_index fields are only visible in debug mode (GPIO0 pulled to ground)

code

ESP8266-DS18S20.ino

Click here to view the source code