Git Product home page Git Product logo

aws-esp8266-api's Introduction

AWS API for ESP8266 Development Software

This project interface the ESP8266 with AWS DynamoDB using the Arduino IDE platform.

Setup:

  1. Copy the ASW folder to your Arduino "../libraries" folder.
  2. Copy the AWS_Get-SetDemo folder to your Arduino IDE sketchbook folder.

Operation:

The ESP8266 sketch:

  1. setup() - connects to your local Wifi and initializes an AWS database client. - a web server is also started, but is not used for this demo sketch

  2. loop() - first gets the current RGB values from a dynamoDB table - then sets the dynamoDB table RGB values to an increment of the value from the 'get'

The current settings (change if needed in the sketch to match your configuration):

ESP8266 Static IP: 192.168.0.174 ESP8266 Server Port: 9703 Router IP: 192.168.0.1

Serial port baud: 74880 bps (Use ESPlorer to monitor ESP8266 serial port)

AWS Settings:

The AWS Dynamodb used in this example was based on the following:

https://github.com/awslabs/aws-sdk-arduino

See section "Table used by SparkGetItemSample and GalileoSample:"

The serial port output from this request will look similar to this:

Loop start time: 20150810210943 GMT
Current Free Heap:21864

GetItem succeeded!
Red value read: 125
Green value read: 107
Blue value read: 107

PutItem succeeded!
Red set to: 126
Green set to: 108
Blue set to: 108

Loop start time: 20150810211000 GMT
Current Free Heap:21864

GetItem succeeded!
Red value read: 126
Green value read: 108
Blue value read: 108

PutItem succeeded!
Red set to: 127
Green set to: 109
Blue set to: 109

Two iterations of the loop() function are shown above. Each iteration has-

  1. A header with the loop start time in the format: yyyymmddhhmmss GMT
  2. The header also shows the free heap, for troubleshooting in case a memory leak is detected.
  3. The get values are displayed
  4. The get values are incremented and then written (put) to the database

Note the lapse time between iterations is about 17 seconds.

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.