Now we will set up the app and write the required code:
- From the Terminal, once you are inside the Azure-IoT-Device folder, run the following command:
$ npm init -y
- Next, we will install azure-iot-device-mqtt from NPM (https://www.npmjs.com/package/azure-iot-device-mqtt). This module has the required client code to interface with Azure IoT.
Along with this, we are going to install the azure-iot-device (https://www.npmjs.com/package/azure-iot-device) and async modules (https://www.npmjs.com/package/async). Execute the following command:
$ npm install azure-iot-device-mqtt azure-iot-device async --save
- Next, we will install rpi-dht-sensor from NPM (https://www.npmjs.com/package/rpi-dht-sensor). This module ...