Happy Manic Maker Monday!
For two upcoming projects, I'm going to be using two flavors of the Seeed Studios Xiao boards based on the NRF52840. These little boards are really something.
For one upcoming project, it has one of each of the exact things I need:
BLE to connect to another project on which I'm working
A few GPIO for a soft power button, an indicator LED, and maybe a vibration motor for haptics
Battery power and charging
An internal IMU (on the Sense flavor)
The only difference between the Sense and the non-Sense is that the former has a built-in IMU and microphone which are meant for tinyML projects since ML is all the rage (think of being in ultra-low power and performing inferences on audio samples but sleeping and collecting in-between).
In fact, for this Learn-a-Thon, there are a few things I totally want to investigate: the Embedded Template Library (for exploration on C++ to really object-orient the project), nRF Connect SDK, Zephyr OS (I'm late to jump on the bus here but there's good talk about this Linux-like take on RTOS), BLE, and TinyML.
nRF Connect SDK - It will be nice to get into the APIs provided by Nordic without any layers inbetween. A simple bare-metal eventloop will be lovely here.
ZephyrOS - I'll probably only be using this one of the projects since for the other one, bare metal will be just fine and I'd like to just get into the direct nRF Connect SDK for the hell of it. They say this abstracts away drivers which is an interesting prospect included in an RTOS! I've heard it's 80% configuration and 20% coding but, if it's good code running the drivers, why not just leverage it!
Embedded Template Library - generally I don't code in C++ besides for work, but I love the idea that it is possible to code something that uses primarily static data and has a low footprint. I've read reviews on ETL, heard about it on podcasts, and just gotta try it. There is a solid reason for using C++ in these projects and that is that I want to create a common base class that outlines capabilities of each of these devices.
BLE - I've done lots with wifi, written wifi drivers, wifi managers, connectivity managers, etc, but never BLE! I totally feel like I need to try it out! Especially since one of the projects is purely a sensor arm that transmits over BLE. Eventually, something else that would be really interesting would be OTA over BLE which I've never had to manage.
TinyML - I also haven't jumped into the ML/AI with both feet really. I've used pre-compiled models and hardware acceleration and some tangential TVM stuff but I want to create the model and see it with my own destructive hands >:) I'm also interested how much optimization is in control of the model developer.
Low Power Mode - I've done some of this already at work but it's a good idea to get in the weeds on a different micro. Especially, I'd like to understand how Zephyr might abstract this, how I can optimize packet offloads, etc.
I've got kind of a slew of experiments I want to try:
Zephyr OS Emulation - No hardware way to get started upper level programming. I would love to code around in Zephyr and get emulated results. Always a handy tool.
Zephyr OS - Get hello world on Xiao (sanity, familiarity, etc)
Zephyr OS + BLE - I've seen demos, I think it's easy to get started. Attaching a button or sensor should be pretty easy from there.
TinyML + IMU + BLE (https://blog.tensorflow.org/2021/05/building-tinyml-application-with-tf-micro-and-sensiml.html)