Line 3: Line 3:
  
 
=AWS IOT for ESP32=
 
=AWS IOT for ESP32=
Download the AWS IOT library for Arduino ESP32 from the below link.
+
Download the AWS IOT library for Arduino ESP32 from [https://github.com/ExploreEmbedded/Hornbill-Examples/tree/master/Arduino/AWS_IOT this link].<br>
 
Now open the first example pubSubTest.ino as shown below.
 
Now open the first example pubSubTest.ino as shown below.
 
[[File:ESP32 AWS IOT LIB.png]].
 
[[File:ESP32 AWS IOT LIB.png]].

Revision as of 17:47, 12 April 2017

In the earlier tutorial we discussed how to setup AWS IOT for an Amazon user account. Now lets see hot to use the Arduino esp32 AWS IOT library to communicate with AWS server.

AWS IOT for ESP32

Download the AWS IOT library for Arduino ESP32 from this link.
Now open the first example pubSubTest.ino as shown below. ESP32 AWS IOT LIB.png.

Wifi SSID and Host Address Configuration

Configure the below parameters at the beginning of the sketch as shown in the image.
WIFI_SSID
WIFI_PASSWORD
HOST_ADDRESS
CLIENT_ID
TOPIC_NAME
ESP32 AWS IOT SSID CONFIG.png


AWS Certificate Configuration

The below certificate and private key needs to be copied to aws_iot_certificate.c file in the form of array.

aws-root-ca.pem
certificate.pem.crt
private.pem.key 

ESP32 AWS IOT Certificates.png

Upload the sketch and verify the output

Publish and subscribe(received) messages printed on terminal. ESP32 AWS IOT Terminal LOG.png

Published message viewed on MQTT Fx client software: ESP32 AWS IOT MQTT LOG.png

Publish a message from MQTT Fx Client and verify the received message on terminal. ESP32 AWS IOT PUBLISH SUBSCRIBE.png

Download

Download the Arduino ESP32 AWS IOT lib and examples form this link.



Have an opinion, suggestion , question or feedback about the article let it out here!