Getting Started with RSL10-SENSE-GEVK

This guide teaches you how to get started using the RSL10 Sensor Development Kit (RSL10-SENSE-GEVK) with Atmosphere. This includes creating your first project, programming the project’s firmware into your RSL10-SENSE-GEVK, registering the device to Atmosphere, and having its data displayed on the cloud.

In the guide you’ll build a simple project that reads temperature, humidity, and pressure data from the kit’s onboard environmental sensor, displays that data on the mobile app, and sends the readings to the cloud.

Prerequisite: You should already have an Atmosphere account.

If you'd like to see the complete demo before attempting this guide, it's available in Atmosphere Studio's Demo Projects section as the BME680 Sensor Demo. Simply open the project to check it out and get started.

Hardware Requirements

For the purposes of this guide we’re using the base model RSL10-SENSE-GEVK kit, but you can use the debug model (RSL10-SENSE-DB-GEVK) as well.

Software Requirements

  • SEGGER JLink Software and Documentation Pack
  • Atmosphere IoT app. The mobile app allows you to view your registered devices and display and run the project’s interface. You can download the Atmosphere IoT app from its downloads page or through the Apple App Store or Google Play Store.
  • Atmosphere IoT Agent. The Atmosphere IoT Agent is a local application that runs in the system tray and acts as an intermediary between the computer’s connectivity protocol drivers and the browser running Atmosphere, used to assist in programming your device. You can download the Atmosphere IoT Agent from its downloads page.
  • Ensure Bluetooth is enabled on the mobile device you’ll use to interact with the RSL10-SENSE-GEVK.

The RSL10-SENSE-GEVK doesn’t contain a built-in programmer, so it’s used alongside the SEGGER JLink tool to program it. SEGGER’s license doesn’t allow Atmosphere to redistribute the tool ourselves, so you must install the JLink Software and Documentation pack prior to programming. Information on programming the RSL10-SENSE-GEVK is included below in Step 6 of 8: Program Firmware into the Device.

Step 1 of 8: Create a New Project

Navigate to Atmosphere Studio from the side menu. When you visit Studio for the first time in a session, you are brought to the Studio Projects screen.

  1. Click the New Project button. This displays a New Project window.
  2. Select the RSL10-SENSE-GEVK project type and give the project a name, then click Create.

This opens a new project in Studio.

This guide walks through the step-by-step process to perform actions in Studio, but doesn't cover the in-depth aspects of Studio itself. To learn more about using Studio, its areas and features, and Studio elements, visit the Atmosphere Studio section.

Step 2 of 8: Create the Project’s Embedded Firmware

The first aspect of building this sample project is adding elements to the Embedded tab to create the project’s embedded firmware. This involves setting an interval to read embedded data, and when run to read the board’s BME680 element.

  1. Add the following elements to the canvas by clicking them in the Element Toolbox:
    • Interval Element Interval element: The interval element sets the project to run at the time set in the element’s properties, which by default is set to once per second (1000 ms).
    • Bosch BME680 Element BME680 element: The BM3680 element reads temperature, humidity, and pressure data. This is an environmental sensor that is onboard the RSL10-SENSE-GEVK, and its element is imported in the Element Toolbox for RSL-SENSE-GEVK projects by default.

      Both of these elements will work as intended by default, so none of their properties need to be changed.
  2. Connect the interval element to the BME680 element. This creates an event between them, which can be seen in either the interval element’s properties, or by clicking the connector’s Configuration Button button. The event added is within the Interval trigger, with the BME680 ability Read Temperature (°C). This means that when the interval element is triggered (which is every second), it will read the sensor’s temperature data.
  3. Now that the interval will read temperature data, we’ll want it to also read the sensor’s humidity and pressure data too. To do this within the same interval element, select the connector between the interval and BME680 elements, and in its properties click the Add Event button twice. This creates two additional events under the Interval trigger between the two elements. In the second event, change the BME680 ability to Read Humidity (%rh). In the third event, change the BME680 ability to Read Pressure (Pa). Now when the interval is triggered, it will read all three values from the sensor. The connector’s properties should resemble the following: RSL10 Guide Interval Connector
  4. Add three BLE Characteristic Element BLE characteristic elements to the canvas. This element creates a GATT characteristic to use in your project, and is a coupled element that bridges the project between the Embedded tab and Application tab, meaning it’s included on both tabs. In each BLE characteristic element’s properties, change the Read Data Type and Write Data Type fields to Floating Point (32-bit). This allows the elements to read and write floating point values, which are the temperature, humidity, and pressure values that will eventually be sent through them. You’re encouraged to give these elements (as well as any other elements) custom names that represent what they do or what data they are passing through, such as naming them “Temperature,” “Humidity,” “and “Pressure” respectively.
  5. Connect the BME680 element to the first BLE characteristic element, which ties the value of the sensor to the Application tab. This creates an event between the two elements in the Temperature Read trigger, with the ability Set Value. This sets a value for the project’s interface after it reads the temperature sensor data.
  6. Next, connect the BME680 element to the second BLE characteristic element. In the connector’s properties between the two elements, select the Humidity Read trigger, then add an event with the ability Set Value. This sets a value for the project’s interface after it reads the humidity sensor data.
  7. Lastly, connect the BME680 element to the third BLE characteristic element. In the connector’s properties between the two elements, select the Pressure Read trigger, then add an event with the ability Set Value. This sets a value for the project’s interface after it reads the pressure sensor data.

That’s all for work in the Embedded tab. To this point, an interval has been set that will run once per second after the project opens, and when run will read temperature, humidity, and pressure values from the onboard BME680 sensor. The Embedded tab canvas should resemble the following image:

RSL10-SENSE-GEVK Embedded Tab

Step 3 of 8: Create the Project’s Interface

The second aspect of building this sample project is adding elements to the Application tab to create the project’s visual component. Here we’ll create a basic interface, pairing the sensor values sent from the Embedded tab with label elements to display their values on labels inside the mobile app.

Click the Application tab to move to the application area of the project. Notice how the Element Toolbox has changed, and that the coupled BLE characteristic elements are displayed on the canvas.

  1. Click the App Builder button in the Application tab’s toolbar to display the app builder. This area creates the visual interface for your project. By default this uses the smallest display size supported for an interface (320x560), but you can add an interface size by clicking the add display button. Use the display size that fits best with your mobile device.
  2. Add an Interval Element interval element to the canvas, and connect it to each of the BLE characteristic elements. Within the interval element’s trigger properties, set each BLE characteristic’s event ability to Trigger under the Interval trigger, which will trigger the the BLE characteristic elements every time the interval triggers.
  3. Add three Label Element label elements to the canvas. The label element displays text on a project’s interface. Notice when the label is added to the canvas, a corresponding interface component is added to the app builder. The label component can be moved around on the interface wherever you like.
  4. Connect the BLE characteristic element carrying the temperature data to the first label element. This creates an event between the two elements of Set Text under the Read trigger, which sets the text to the value of the label when the BLE characteristic is read. This correlates the set value from the BLE characteristic element in the Embedded tab to the label on the interface. Within the Set Text event, modify the Text field to "Temperature:" + readData.toFixed(2). This argument reads the temperature data and truncates the value to two decimal places.
  5. Connect the BLE characteristic element carrying the humidity data to the second label element. Like the first element, this creates an event of Set Text under the Read trigger. Within the Set Text event, modify the Text field to "Humidity:" + readData.toFixed(2).
  6. Finally, connect the BLE characteristic element carrying the pressure data to the third label element. Like the previous elements, this creates an event of Set Text under the Read trigger. Within the Set Text event, modify the Text field to "Pressure:" + readData.toFixed(2).

This is all that needs to be done for the project’s interface, simply using three labels to display text values. To this point, an interval has been set that will trigger the BLE characteristic elements once per second, which will display the read temperature, humidity, and pressure values on the three interface labels.

The Application tab’s interface and canvas should resemble the following images:

Interface Canvas
RSL10-SENSE-GEVK Guide App Interface RSL10-SENSE-GEVK Guide Application Tab

Step 4 of 8: Enable the Project’s Cloud Connectivity

The last aspect of building this sample project is enabling it for cloud connectivity. This is done on both the Application and Cloud tabs.

  1. While still in the Application tab, add three Cloud Event Element cloud event elements to the canvas. The cloud event element is a coupled element between the Application and Cloud tabs that enables a project’s data to be sent to Atmosphere.
  2. Connect the BLE characteristic element carrying the temperature data to the first cloud event element. This adds the Send Event event to the BLE characteristic element’s Read trigger, which sends the set value data to Atmosphere when the BLE characteristic is read. Then connect the second BLE characteristic element carrying the humidity data to the second cloud event element, and the third BLE characteristic element carrying the pressure data to the third cloud event element, both of which create the same event in their respective connectors.
  3. Click the Cloud tab to move to the cloud area of the project. Notice how the Element Toolbox has changed, and that the coupled cloud event elements are displayed on the canvas.
  4. Add a Cloud Storage Element cloud storage element to the canvas, and connect the temperature data cloud event element to it. By default, this creates an event using the Add Data ability within the cloud event’s Event Received trigger. This allows Atmosphere to add (and store) data sent to it from the connected cloud event element. Within the Add Data event, modify the Value field to "{"Temperature": value}, which will label the temperature dataset when displayed in the cloud.
  5. Connect the humidity data cloud event element to the cloud storage event, which creates the same event. Within its Add Data event, modify the Value field to "{"Humidity": value} to label the humidity dataset when displayed in the cloud.
  6. Lastly connect the pressure data cloud event element to the cloud storage event, and likewise in its Add Data event modify the Value field to "{"Pressure": value} to label the pressure dataset when displayed in the cloud.

That’s all for creating the project! With the added cloud connectivity, the project will send the temperature, humidity, and pressure values from the Embedded tab to the Application tab, where the values are displayed on the mobile app. The project also uses three cloud events to send the data to the Cloud tab, where they are connected to a cloud storage element to store the data on Atmosphere.

The final canvas for each tab should resemble the following images:

Embedded Application Cloud
RSL10-SENSE-GEVK Guide Embedded Tab RSL10-SENSE-GEVK Guide Application Tab RSL10-SENSE-GEVK Guide Cloud Tab

Step 5 of 8: Compile the Project

Once the project is finished, it needs to be compiled. Compiling readies the entire project’s source code for deployment.

  1. From any tab, click the Compile 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 receive a notification when the project is compiled.

Step 6 of 8: Program Firmware into the Device

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 the following configuration:

  • JLink Software and Documentation Pack must be installed and placed in the system’s path. If you install using the .deb or .rpm for Linux, this will happen automatically. For Windows, you may need to manually add the JLink path (e.g. C:\Program Files (x86)\SEGGER\JLink_V644g). Once this has been done, restart the Atmosphere IoT Agent if it’s already running for the setting to take effect.
  • JLink is connected to the computer via USB and its ribbon cable is connected to the RSL10-SENSE-GEVK.
  • The RSL10-SENSE-GEVK is powered on, either via battery or external 3.3V power.
  • The Atmosphere IoT Agent is installed on the computer and running. The Atmosphere IoT Agent is a local application that runs in the system tray and acts as an intermediary between the computer’s connectivity protocol drivers and the browser running Atmosphere.
  • An Internet connection is maintained.
  • The project to be programmed has been compiled.

With setup complete, you can program your board:

  1. While the Embedded tab is active, click the Program Firmware button from the tab’s toolbar. This displays the Program Firmware window.
  2. Click Program to start programming. When complete, you’ll receive a notification stating the RSL10-SENSE-GEVK is programmed with the project’s embedded firmware.

Step 7 of 8: Register the Device

With firmware installed, the device can now be recognized and connected to Atmosphere. From here, open the Atmosphere IoT app on your mobile device. We’ll use the mobile app to both register the device, and eventually view the label data on the project’s interface.

To register the RSL10-SENSE-GEVK:

  1. Navigate to the Devices page, and click the Register Device button in the top-right 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 range from the mobile device you are attempting to register from, otherwise it may not appear.
  2. The list of available devices appears. Select your RSL10-SENSE-GEVK you just programmed and it will connect to Atmosphere.

The device is now registered to Atmosphere and added on your Devices page. The app interface you created is 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.

Step 8 of 8: View Device Data

Now that the device’s data is sent to Atmosphere, let’s view it through one of the many device dashboard widgets available. In this guide we’ll use a data glance widget to display the pressure data, and a data graph widget to chart the temperature and humidity data.

We’ll do this directly on the device’s dashboard page itself, so click on the newly-added RSL10-SENSE-GEVK to enter its page.

  1. To add a widget to the device’s dashboard, click the Configuration button on the side of the page. This displays the menu of available widgets. Select the Data Glance data glance widget to add a data glance to the dashboard.
  2. Once on the dashboard, click the widget’s Menu menu icon to display its menu, then click Settings.
  3. In the data glance’s settings, modify the following properties:
    • Name: Give the widget a name, such as “Pressure Data.”
    • Units: Enter Pa for its unit of measurement.
    • Icon: Select an icon that represents the data, such as the Pressure icon.
    • Color: Give the widget a color that represents the data.
  4. In the Data Source field, click Select, then choose the following configuration options for the widget:
    • Select Cloud Storage: Click the cloud storage that is storing the pressure data.
    • Select Value: Select the pressure dataset.
  5. When finished click Save. The data glance is then populated with the pressure value, which updates every second.
  6. Now add a Data Graph data graph widget to add a graph to the dashboard, then go to its settings.
  7. Give the data graph a name (such as “Climate Data”), then in its Data Source field click Select and choose the following configuration options for the widget:
    • Cloud Storage: Select the cloud storage that is storing the data.
    • X-axis Value: Select the timestamp to go along the graph’s x-axis.
    • Y-axis Value: Select both the temperature and humidity datasets to go up the graph’s y-axis.
  8. When finished click Save. This populates the data graph plotting the temperature and humidity 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.

RSL10-SENSE-GEVK Demo Dashboard

Congratulations, you just finished a complete RSL10-SENSE-GEVK project with Atmosphere!