This example shows how NB-IoT can be used to monitor the quality of your surrounding environment.
Measure air quality, noise levels and temperature to provide stakeholders a dashboard to support their decision making to improve quality of living. This experiment will send every 5 minutes an updated value of the sensors.
environmental-sensingunder File > Examples > arduino-nbiot-rdk-master.
If you did the first application on the previous page, your device is ready for use, and you can continue and run the example.
If not, please complete the following step.
keys.hfile located in the
arduino-nbiot-sdk-masterLibrary folder, by default you can find it in:
DeviceTokenvalues with the values that can be found under Device Settings > Authentication section of your device in the Maker Application. In the
keys.hfile you will notice that the APN is already pre configured and should not be changed.
Simply hit the upload icon in the Arduino IDE. This will save the sketch, compile it and upload it to your Arduino.
After uploading, you might need to flip the power switch on the Sodaq Mbili OFF and back ON to make sure the Mbili reboots and starts up our sketch.
You can now watch the values change in Maker.
Alternatively, you can open the Tools > Serial monitor of the Arduino IDE.
- Make sure you select the correct COM port to listen (under Tools > Port )
- When the monitor is open, make sure the Baud rate is set to 57600
To visualise our date, we will create a pinboard. For more information on pinboards, please check how to use pinboards.
Now we will pin a control (visual representation) for each of our assets (Loudness sensor, Light sensor, Temperature sensor, Humidity sensor, Pressure sensor and Air quality sensor).
Repeat this for each of our assets. Or use the
+ Create Pinboard button in Maker to add multiple assets in a single action.
For extra options to customise your controls, please check the Controls page.