This project uses TAMK's Sensor Board, which consists of Arduino Mega 2560, Arduino Ethernet Shield V1 (not used in this example), Dallas temperature sensor and an LCD screen. The data is sent to a computer using serial connection and then sent to the AWS IoT using their Python SDK. As to why we are using Python in between, instead of sending data straight from Arduino, is because Amazon Web Services is too secure for the board to handle the authentication process.
A more thorough set of instructions and information is in the Documentation folder.
- Upload the JSON-To-PC.ino to your board
- In Python folder, add your certificate and private key to login folder and modify the AWS details in AWS_details.py to match your AWS IoT service. Mainly the following details:
rootCertificatePath = loginFolder + "rootCertificate.pem"
privateKeyPath = loginFolder + "MyThermometer001.private.key"
certificatePath = loginFolder + "MyThermometer001.cert.pem"
hostname = "xxxxx.iot.eu-west-2.amazonaws.com" # Your API endpoint.
thingName = "MyThermometer001" # Name of your thing (i.e. device) on AWS
- Run main.py to get data from Arduino and send it to AWS IoT.