Now, we will set up the app and write the required code:
- From the Terminal, once you are inside the AWS-IoT-Thing folder, run the following command:
$ npm init -y
- Next, we will install aws-iot-device-sdk (http://npmjs.com/package/aws-iot-device-sdk) from NPM. This module has the required client code to interface with AWS IoT. Execute the following command:
$ npm install aws-iot-device-sdk --save
- Next, we will install rpi-dht-sensor (https://www.npmjs.com/package/rpi-dht-sensor) from NPM. This module will help in reading the DHT11 temperature and humidity values. Let's run the following command:
$ npm install rpi-dht-sensor --save
- Your final package.json file should look like this:
{ "name": "AWS-IoT-Thing", ...