Send and receive messages from RP2040 over Bristlemouth

Here there,

Wouldn’t it be neat if you could send custom messages from your Spotter to a microcontroller wired to your dev kit?

Perhaps you want to toggle and LED on or off, or trigger a motor to activate a quick release mechanism underwater. Or, what if if you could set calibration constants for a sensor after you’ve sealed up the waterproof enclosure or potted the assembly? AND wouldn’t it be awesome if you could do all your firmware development in micropython?

Now you can!

Thanks to some firmware magic from @matt001k there is an updated bm_serial.py that we’ve been testing with RP2040 based microcontrollers running CircuitPython. You can now configure the RP2040 (or similar micropython MCU) to subscribe to custom topics/messages.

Here is a bare-bones repo with a “hello world” example to get you up and running.

Disclaimers

  • This has been tested on the Adafruit RP2040 QTPY board. You’ll need to tweak the UART RX/TX definitions in the bm_serial.py file to get it working with other Micropython and Circuitpython.
  • You’ll need to flash new firmware to your Mote and can use the instruction here.
  • As of now, you’ll need to send the commands to the Spotter over a USB cable so this will have practical limitations for field use.

Let me know if you find this helpful or run into issues, it would be great to hear how this might help other peoples projects.

Thanks for the help getting this off the ground Matt!

3 Likes