In the previous post, I demonstrated a very basic micro ROS implementation running on the Pololu 3pi+ 2040. This post expands upon that demonstration to include battery sensor telemetry.
Step 3: Pololu 3pi+ 2040 Sensor Telemetry to micro ROS
In this step, I modified the micro ROS Pico demonstration code to interface with the built-in sensors in the 3pi+ 2040.
So far I’ve forked the micro ROS repository, added a bit of battery-level reading code stolen from the Pololu 3pi+ 2040 repository, and then added a bit of logic to make a new publisher node for the battery power level. All that code is in my Github repository here.
The following link is to the Pololu example code for the Pololu 3pi+ 2040.