Software setup - Part 2
In the previous blog Smart Module for Healthcare and Asset Monitoring - Blog #3, we have completed our program, we need to flash the same on to the device.
Once the project is finished, it needs to be compiled. Compiling readies the entire project’s source code for deployment.
From any tab, click the button in the project options menu on the top-right of the screen. You’ll see a loading message on the screen indicating compiling has started, and will be notified when the project is compiled.
You will get a confirmation at the bottom after successful compilation.
With the project compiled, your RSL10-SENSE-GEVK can be programmed with the project’s embedded firmware.
Programming the RSL10-SENSE-GEVK involves using the programmer interface in Atmosphere Studio to install embedded firmware.
Prior to programming a device, ensure you have completely made sure the initially specified pre-requisites are done.
Let's program our board.
Connect the JLink debugger board to the PC via USB and the RSL10-SENSE-GEVK via the provided USB cable.
While the Embedded tab is active, click the button from the tab’s toolbar. This displays the Program Firmware window. Click Program to start programming.
If you happen to get the following prompt, it is because the JLink debugger is not properly connected to the USB. Recheck the connection or try with a new USB cable.
Now some of you may get the following:
Another case is below:
Even though the prompt windows say 100% or complete, it actually hasn't. You can notice certain errors in the program output window. The reason for this prompt is because there is no connection to the RSL10 module which might have been put to deep sleep mode since it came with the default firmware or the coin cell battery might not have enough power to keep ìt working.
TIP: The board needs to be powered externally via a coin cell CR2032 battery or via external 3.3v supply. Richard LaBorde, who is an atmosphere IoT support member was of great help in assisting me to solve a lot of hurdles along the way. I wish to thank him for his support.
When complete, you’ll receive a notification stating the RSL10-SENSE-GEVK is programmed with the project’s embedded firmware.
With firmware installed, the device can now be recognized and connected to the Atmosphere network. From here, open the Atmosphere IoT app on your mobile device.
We’ll use the mobile app to register the device, and eventually view the data on the project’s interface. To register the RSL10-SENSE-GEVK, navigate to the Devices area, and click the button in the top-right of the screen to display the Add Device window. When the window opens it automatically starts scanning for available devices within range.
Ensure your RSL10-SENSE-GEVK is within the range from the mobile device you are attempting to register from, otherwise, it may not appear.
The list of available devices appears. Select your RSL10-SENSE-GEVK you just programmed and it will connect to the Atmosphere.
The device is now registered to the Atmosphere and added in the Devices area.
The app interface we created will be displayed on the screen, with device data immediately shown on it.
Since the interval in the project was set to run once per second, the readings should update every second.
Now that the device’s data is sent to the Atmosphere, let’s view it through one of the many device dashboard widgets available.
We will use a data glance widget and a data graph widget to monitor the temperature data. We’ll do this directly on the device’s console page, so click on the newly-added RSL10-SENSE-GEVK to enter its console.
To add a widget to the device’s dashboard, click the button on the right side of the screen. This displays the menu of available widgets. Select the data glance widget to add a data glance to the dashboard.
Once on the dashboard, click the widget’s menu icon to display its menu, then click Settings. In the data glance’s settings, modify the following properties.
- Name: Give the widget a name, such as “Temperature Data.”
- Units: Enter
C
for its unit of measurement. - Icon: Select an icon that represents the data, such as the
Temperature
icon. - Color: Give the widget a color that represents the data.
- In the Data Source field, click Select, then choose the following configuration options for the widget. Click the cloud storage and select the temperature dataset.
When finished click Save.
The data glance is then populated with the temperature value, which updates every second. Now add a data graph widget to add a graph to the dashboard, then go to its settings.
Give the data graph a name (such as “Temperature Data”), then in its Data Source field click Select and choose the following configuration options for the widget: Select the cloud storage that is storing our data.
For X-axis Value: Select the timestamp to go along the graph’s x-axis. For Y-axis Value: Select the temperature dataset to go up the graph’s y-axis. When finished click Save.
This populates the data graph plotting the temperature values as time progresses. If you’d like to adjust the graph’s timeline or its bounds, you can edit those properties from the data graph’s menu as well.
The same widgets can be viewed on the mobile app from the dashboard view.
Congratulations we have finished our software part of Smart Wearable Project.
Similarly, once you compile the project with modifications for the Asset Monitor Project, flash it to the device and use the app and dashboard to view the data being monitored.
In the next blog, we will work on the hardware. Stay tuned
Blogs in this series:
Smart Module for Healthcare and Asset Monitoring - Blog #1 [Introduction]
Smart Module for Healthcare and Asset Monitoring - Blog #2 [Kit Unboxing]
Smart Module for Healthcare and Asset Monitoring - Blog #3 [Software Setup 1]
Smart Module for Healthcare and Asset Monitoring - Blog #4 [Software Setup 2] --> Current
Smart Module for Healthcare and Asset Monitoring - Blog #5 [Hardware Setup & Testing]