Overview

This guide covers writing a simple application on the Dev Board that reads data from the internal sensors on the Dev Board, processes it, and sends it to the backend via Spotter’s telemetry (Iridium satellite or cellular). By the end of this guide, you’ll know how to use the Sofar API to access data sent to the cloud from your Dev Kit.

The Bristlemouth Dev Board contains several on-board sensors: an IMU, internal temperature, internal humidity, internal pressure, and electrical power monitors. In this application, we’ll retrieve data from these sensors, aggregate the data into statistics, use the Spotter to send reports to the Sofar backend, and access the data via the Sofar API.

<aside> 📖 For more technical detail and open source schematics of the Dev Board hardware, checkout the Downloads ****section of our Technical Documentation.

</aside>

Contents:

<aside> ⏳ Expect to take more than 60 minutes on this guide.

</aside>

Goals

Let’s start by outlining the features we want to implement in this first sprint. We can always add more, so we’ll keep things simple to start with, building and testing incrementally. We want our custom application to:

Set up and configure your hardware

Let’s make sure your computer and Dev Kit are all set up to develop and deliver this custom Bristlemouth application.

<aside> ⚠️ Before starting this guide, make sure you’re set up to develop and load firmware onto your Dev Kit by completing Bristlemouth Dev Kit Guide 4: Setting Up Your Firmware Development Environment.

</aside>

  1. Make sure your Dev Kit is connected to the Spotter and Smart Mooring per the instructions in ‣.

  2. Connect to the Dev Kit via USB serial console as described in previous guides.

  3. In the Dev Kit USB serial console, adjust the Dev Kit configuration value sensorsPollIntervalMs to 2000 ms ****(2 seconds). The code we’re going to write in a little bit will rely on this being set to 2 seconds. Here is how:

    **> cfg sys set sensorsPollIntervalMs u 2000**
    
    set 2000
    
    **> cfg sys save**
    
    Successfully erased sector