Raspberry Pi Zero W – Connect Sensors to Amazon AWS IoT

Raspberry Pi Zero W – Connect Sensors to Amazon AWS IoT

After the recent intro to the RPiZW, this time we’ll connect it to Amazon Web Services IoT platform and send some temperature readings up into the cloud. (The first look video for this RPiZW can be found here: https://youtu.be/Z0GN5WpkYPE)

This has the setup of the RPiZW with DietPi (instead of the usual NOOBS or Raspbian), Python and the Dallas DS18b20 temperature sensor. After configuring and checking the connection from Pi to AWS IoT (using MQTT), we change the Amazon code and send temperature readings into the IoT platform.

Once in the platform, you can route the data to various places for storage, processing and visualization. Please add a comment to this video if you’d like to see Amazon S3 or Kinesis/Firehose.

Code used in this video is shared on Github:
https://github.com/magiccow/aws-iot-raspizw-temperature

Dallas DS18b20 datasheet (1-wire temperature sensor): https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
More about how the 1-wire protocol works can be found in an informative tutorial video from Maxim (requires Flash viewer): https://www.maximintegrated.com/en/products/1-wire/flash/overview/

Various places on Ebay/usual China websites will supply the DS18b20 for £1 for 1 or two units; beware of rip-off vendors that sell them for £5 each!

DietPi can be found here: http://dietpi.com/

MQTT information: http://mqtt.org/

AWS IoT information can be found here: https://aws.amazon.com/iot/
Sign up for a trial, they offer free access so that you can experiment.

Related Post: