It's super easy to get started with embedded code using CircuitPython.

As of July 2024, the first goal of the code in this repo is to provide minimal, basic, easy access from CircuitPython to the most useful features of a Bristlemouth network as part of a Sofar Ocean Smart Mooring:

Overview of How to Get This Working

We’ll go through each of these steps in more detail in this guide but if you’re an experienced developer you can follow the steps here to get going right away. If you’d like a more detailed tutorial keep reading.

  1. Update your Bridge to v0.11.1.
  2. Update your Spotter to v2.15.1.
  3. Flash the serial_bridge app to your Bristlemouth dev board.
  4. Connect the RP2040 to UART TX, UART RX, and GND on the Dev Board.
  5. Copy bm_serial.py to the lib directory of your CircuitPython board.
  6. Call spotter_tx and spotter_log from your CircuitPython code! It may be helpful to look at these as implemented in example.py.

Updating Your Firmware

<aside> ⚠️ You’ll need Spotter v2.15.1 or higher and Bridge (Spotter’s Bristlemouth) firmware 0.11.1 or higher. If you don’t know or want to update follow the steps below “Updating Your Firmware.” If you’re on the latest, you can skip to the next sectionWorking with the Adafruit RP2040

</aside>

The most difficult step right now is updating Spotter firmware to support the new functionality. Soon Sofar Ocean will publish a comprehensive firmware management guide. In the meantime, here are brief instructions focused on the CircuitPython use case.

You should only need to do this once to enable CircuitPython.

Step 1: Update Bridge Firmware

  1. Remove the SD card from Spotter, and put it in your computer. Backup and/or clear any old information or binaries.