I'm excited to get started with Raspberry Pi Pico

I’ve been taking my phone on the water to track my dinghy racing with GPS. But for obvious reasons, taking a £600+ phone on the water is less than ideal. I wanted a cheap GPS device I could control, automate and integrate with.

The aim will be met by an “embedded” device of some sort, so I started researching. Pimoroni is a local company providing high quality components for electronic makers, so I went with one of their Pimoroni Pico LiPo 2 XL W boards, which integrates battery controller and WiFi/Blutooth. At around £22, it seems good value and low hassle.

The electronics will need to be in a watertight container, which means control will initially be limited to a barometric pressure sensor (bmp280), from Amazon for about £1.20.

My first step to GPS success is to get the battery, pico and bmp280 working together. This was via micropython (I did c/c++ a long time ago, but the toolchain for this feels a much quicker start).

Hooking up the barometric sensor as a switch to turn on the integrated LED was a very cool first step. However, to test I had to unplug the USB cable, screw the lid on the bottle and squeeze. If it didn’t light up, I had no way of debugging, not even ‘print()’ messages!

Enter WiFi and Blutooth. I chose to print debug messages to the Blutooth Low Energy(BLE) device. That entailed a tutorial and code to activate and send data to the BLE device, quickly diverging from the topic of that tutorial.

Connecting to the BLE device from my macbook was amazingly easy with the Serial software from Decisive Tactics.

I can now log barometric pressure to the Serial app on my MacBook allowing me to fine-tune the pressure difference required to trigger the LED and, eventually, the GPS tracking.

I’ll also look to build a companion mobile app to exfiltrate the GPS data from the device, making WiFi configuration something the user won’t need to deal with.

James Cowlishaw @Cowlibob
Mastodon