![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
V.06 11/3
Dependencies: FT6206 SDFileSystem SPI_TFT_ILI9341 TFT_fonts
Fork of ATT_AWS_IoT_demo by
Diff: README.md
- Revision:
- 24:224c07ec3bd0
- Parent:
- 21:56f91bdacff1
- Child:
- 25:91d771247ac8
diff -r b9ff83dc965f -r 224c07ec3bd0 README.md --- 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