GithubHelp home page GithubHelp logo

currentcost's Introduction

CurrentCost

This sketch is for the CurrentCost Bridge device that causes readings to be published over HTTP using JSON.

alt tag

Sending interval is set to 5 minutes and the value is an average of all packets arrived to the bridge.

You will need a programmer to upload this sketch to your device. I am using a USBtinyISPv2 but you can use every programmer that is listed in the arduino IDE.

Customize

You will need to specify the SERVER_HOST_NAME and uuid.

Installation

This must be compiled with the board set to: Arduino Pro or Pro Mini (3.3V, 8MHz) w/ ATmega328

Plug the ISP into the 6-pin header on the bridge board. If you have the ISP set to power the board make sure you haven't got the bridge's own power supply plugged in. From the Arduino IDE, burn the bootloader. To do this, first ensure

Tools->Board->Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328

is selected. Make sure you select the correct type of programmer Tools->Programmer.

After that just press CTRL+SHIFT+U(or Sketch->Upload Using Programmer) to upload using the programmer.

Consuming the data

The bridge will make a PUT request to the specified url with a payload like the following.

[ {"id": "0", "value":"420"}, {"id": "1", "value":"80"}, {"id": "10", "value":"25.4"} ]

Credits

Big thanks to knolleary for the parsing code: https://gist.github.com/knolleary/900885

currentcost's People

Contributors

kechap avatar

Stargazers

Andy Godber avatar

Watchers

James Cloos 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.