Overview

This guide covers writing a simple application on the Dev Kit that reads data from the internal sensors on the Dev Kit, processes it, and sends it to the backend via the 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 the Dev Kit.

The Bristlemouth Development Board has 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 Kit hardware, checkout the Downloads ****section of 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’ll keep things simple to start with, building and testing incrementally. We want our custom application to:

Set up and configure the hardware

Let’s make sure the 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 the Dev Kit by completing Bristlemouth Dev Kit Guide 4: Setting Up the Firmware Development Environment.

</aside>

  1. Make sure the Dev Kit is connected to the Spotter and Smart Mooring per the instructions in Bristlemouth Dev Kit Guide 2: Connecting to a Spotter and Smart Mooring.

  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 you are 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