Giter Club home page Giter Club logo

aws-iot-esp32-arduino-examples's Introduction

AWS IoT + esp32

This project contains several Arduino examples for AWS IoT projects using ESP32 Wi-Fi+BLE based development modules.

Arduino support for ESP32 modules can be found here.

For each example you will need to register an AWS IoT device and create credentials.

Each example has a "secrets.h" file where Wi-Fi and device credentials are to be stored.

Required Parameters:

  • WIFI_SSID: The name of the Wi-Fi network to connect to. Should not include special characters or spaces.
  • WIFI_PASSWORD: The password of the Wi-Fi network to connect to.
  • THINGNAME: Must match the name of the device in the AWS IoT console.
  • AWS_IOT_ENDPOINT: The endpoint associated with your AWS IoT Core account.
  • AWS_CERT_CA: Amazon Root CA 1
  • AWS_CERT_CRT: AWS IoT Thing Certificate
  • AWS_CERT_PRIVATE: AWS IoT Thing Private Key

Required Arduino Libraries:

Examples:

  • basic-pubsub: Connects to AWS IoT. Demonstrates subscribing to and publishing to topics. Works great with the lambda-iot-rule serverless application.
  • thermal-printer: Connects to AWS IoT and subscribes to a topic. Prints messages out to a physical receipt printer.
  • spectral-sensor: This example connects a Sparkfun Spectral Triad (AS7265x) sensor to an Arduino connected to AWS IoT. This sensor examines light absorption on various wavelengths across IR, UV, and visible light. These values can be used to detect different materials.

M5Stick Examples:

  • m5stick-lcd: Connect an M5Stick to AWS IoT and display messages on its built in LCD.
  • m5stick-env: Publish magnetic compass heading, temperature, barometric pressure, and humidity to AWS IoT using an M5Stick with the ENV hat module.

Sample AWS IoT Policy

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "iot:Connect",
      "Resource": "arn:aws:iot:REGION:ACCOUNT_ID:client/THINGNAME"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Subscribe",
      "Resource": "arn:aws:iot:REGION:ACCOUNT_ID:topicfilter/esp32/sub"
    },
	{
      "Effect": "Allow",
      "Action": "iot:Receive",
      "Resource": "arn:aws:iot:REGION:ACCOUNT_ID:topic/esp32/sub"
    },
    {
      "Effect": "Allow",
      "Action": "iot:Publish",
      "Resource": "arn:aws:iot:REGION:ACCOUNT_ID:topic/esp32/pub"
    }
  ]
}

Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0

aws-iot-esp32-arduino-examples's People

Contributors

amazon-auto avatar virgilvox avatar ytakio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-iot-esp32-arduino-examples's Issues

How can I publish data to shadow?

Hello dears,

Good afternoon, I hope you are well.

I would like to ask for help to be able to publish sensor data through the shadows ... I have read the information but unfortunately I do not understand ... could you help me?

I would really appreciate it.

Thanks for your understanding.

Nicolas Vasquez
Creatiox Chile

Formatting the Certificate array in secrets.h

I've created a sample program using the same construct for the certificate array in an AVR studio project.
I see 0x0A added into the array at every end of line.
I believe quotes should be used on each line together with the \ character.

(docs): basic-pubsub serverless app not found

This part of README.md points to an AWS Serverless App Repository which seems to be inaccessible. The link returns the message:
The application you were looking for could not be found. Return to the applications search page.

Examples:

  • basic-pubsub: Connects to AWS IoT. Demonstrates subscribing to and publishing to topics. Works great with the lambda-iot-rule serverless application.

Things I tried:

  • Following the link directly from the guide here
  • Searching the SAR for "lambda-iot-rule" and other variations.

I have an AWS support ticket open for this and will report back when I get a response.

Follow up
AWS support classified this as a technical issue, which is strange because the app is missing from the SAR entirely.

I will start a repo in CDK that aims to recreate the deployment process. Please leave a comment if you would like to assist me.

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.