Demo application for using the AT&T IoT Starter Kit Powered by AWS.

Dependencies:   SDFileSystem

Fork of ATT_AWS_IoT_demo by Anthony Phillips

IoT Starter Kit Powered by AWS Demo

This program demonstrates the AT&T IoT Starter Kit sending data directly into AWS IoT. It's explained and used in the Getting Started with the IoT Starter Kit Powered by AWS on starterkit.att.com.

What's required

  • AT&T IoT LTE Add-on (also known as the Cellular Shield)
  • NXP K64F - for programming
  • microSD card - used to store your AWS security credentials
  • AWS account
  • Python, locally installed

If you don't already have an IoT Starter Kit, you can purchase a kit here. The IoT Starter Kit Powered by AWS includes the LTE cellular shield, K64F, and a microSD card.

Revision:
24:224c07ec3bd0
Parent:
21:56f91bdacff1
Child:
25:91d771247ac8
--- a/README.md	Thu Dec 15 18:05:09 2016 +0000
+++ b/README.md	Fri Dec 16 18:04:39 2016 +0000
@@ -1,10 +1,17 @@
 #############################################################################################################
-Summary
+Shadow Demo Summary
 #############################################################################################################
-This demo uses the FRDM-K64F target hardware and the Avnet Shield M14A2A (using AT&T LTE network) to connect
-to an Amazon Web Services IoT "thing" (device).  The AWS IoT device Shadow will reflect the FRDM LED color
-along with FRDM sensor data.  The (optional) Python GUI can be used to reflect the Shadow information and 
-request LED color changes.
+The Shadow demo uses the FRDM-K64F target hardware and the Avnet Shield M14A2A (using AT&T LTE network) to 
+connect to an Amazon Web Services IoT "thing" (device).  The AWS IoT device Shadow will reflect the FRDM LED 
+color along with FRDM sensor data.  The Python GUI (ATT_AWS_IoT_Demo_GUI.py) can be used to reflect the Shadow 
+information and request LED color changes.
+
+#############################################################################################################
+Topic Demo Summary
+#############################################################################################################
+The Topic demo can be ran by following the steps in the "Topic Demo Quickstart" below.  Instead of writing to
+the thing Shadow this demo publishes a JSON payload (color/temp/humidity) to a Topic.  From AWS you can define
+a Rule to perform any number of actions from the Topic.
 
 #############################################################################################################
 Resources
@@ -25,7 +32,7 @@
 https://github.com/aws/aws-iot-device-sdk-python
 
 #############################################################################################################
-Demo Quickstart
+Shadow Demo Quickstart
 #############################################################################################################
 NOTE1: FRDM-K64F bootloader must be updated to work with Windows 10 (otherwise board will reset over and over).
 
@@ -45,7 +52,11 @@
 
 MBED:
 1) In the mbed ATT_AWS_IoT_demo project open "network_interface.h" and comment in the following:
-   #define USING_AVNET_SHIELD // NOTE: Make sure you only comment in ONE Network Connection
+   #define USING_AVNET_SHIELD 
+
+   NOTE: Make sure you only comment in ONE Network Connection.  Alternately you can comment in
+   USING_FRDM_K64F_LWIP to use the wired Ethernet.
+
 
 2a) Option a (default) - Use an SD card:
     a) Format a MicroSD card to use a "FAT32" file system (https://www.sdcard.org/downloads/formatter_4/)
@@ -116,4 +127,24 @@
 3) Press the SW3 button on the FRDM board to cycle the LED color ->              (Off R G B W)
 4) Use the AWS IoT Console to "Update shadow" to set new 'desired' colors via -> (0   1 2 4 7)
 5) Use the Python GUI buttons to request 'desired' colors.  The GUI should also report the "AWS Reported LED Status"
-6) See the FRDM board report the Temperature and Humidity values.
\ No newline at end of file
+6) See the FRDM board report the Temperature and Humidity values.
+
+#############################################################################################################
+Topic Demo Quickstart
+#############################################################################################################
+1) In order to setup the Topic Demo you still have to perform all of the Shadow Demo steps.
+
+2) In the mbed ATT_AWS_IoT_demo project open "main.cpp" and comment in the following line:
+   //return outOfBoxDemo();
+
+3) In the mbed ATT_AWS_IoT_demo project open "aws_iot_config.h" and set the AWS_IOT_MY_TOPIC:
+   #define AWS_IOT_MY_TOPIC               "ExampleTopic/%s"
+
+4) In AWS Console go to AWS IoT -> Test -> Subscribe to a topic and as the topic name put in "ExampleTopic/+"
+   // NOTE: the "/+" is a wildcard, this demo puts the ICCID there.  This allows you to have multiple devices
+   // publish to the same Topic.
+
+Once all this is setup you should be able to:
+Wait for the target to print "READY TO PUBLISH!"
+Press the SW3 button, and the LED should change color and a JSON packet will be sent to the Topic
+In the AWS Console you should see the Topic data, for example -> "{"color":"Blue","temperature":86.876564,"humidity":36}"
\ No newline at end of file