M0o+ - Pi Wars at Home 2022

Initial post for Pi Wars 2022

Pi Wars (at home) 2022 is upon us, and after taking 2020 “off”, I’ve had an application accepted for the competition. I’ll be blogging about my progress here the same way I did for 2019 and Mini Mouse.

The “in person” 2020 competition was postponed on account of the Covid-19 pandemic, and hasn’t yet taken place. In 2020, an “at home” competition took place, with competitors submitting videos for each challenge. The 2022 “at home” competition will follow the same model, with competitors constructing the courses at home and submitting videos of challenge attempts.

The theme for the competition is “Old McDoofus Had a Farm”, with various farming-themed challenges, and my entry is called “M0o+” (pronounced “moo plus”) - more on that below.


2021 saw the launch of Raspberry Pi’s first custom silicon1 - the RP2040 - and with it the Raspberry Pi Pico board which uses it.

As the Pico is considered a “Raspberry Pi”, the Pi Wars rules have seen an interesting update, allowing the main controller of the robot to be a Pico this year! This is the first time that a microcontroller-class processor has been allowed as the primary controller for a Pi Wars robot, and I’ve decided to take on the challenge of using it.

So, M0o+ will be powered by a Raspberry Pi Pico - which is a dual-core Arm Cortex-M0+ microcontroller, which compared to other M0+ devices has a large amount of RAM (>256 kB), a very high clock speed (~130 MHz) and some very interesting peripherals.

M0o+ is a play on Cortex M0+ and the sound that cows make, don’t @ me!

Note to self: We need a logo 🙂

Pico Power

Using the Pico presents several challenges, which I feel adds a lot of interest to the overall project:

  • Puny processing power, compared to all other Raspberry Pis.
  • No Linux! There are RTOSes available, but Linux is a no-go.
  • Limited 2 MB of Flash for code and data.
  • Just 264 kB of RAM, which is large for an M0+ microcontroller, but barely enough to store a single camera frame at 320x240 pixels.
  • No wireless connectivity, no bluetooth, no ready-made Bluetooth or network stack. All useful/necessary for command/control/debug/programming.
  • No native camera interface.

I hope (and believe) that these can be overcome to produce a competent Pi Wars entry, so that’s what I’m aiming for!


Rebound RC Car

My intention is to re-purpose my old childhood Tyco Rebound chassis, replacing everything but the wheels, gearboxes and chassis structure.

Initial testing has shown that the motors are very poorly suited to Pi Wars. They’re very high-power, high-torque, high-speed motors designed for throwing the car down canyons and across fields, not providing the precise low-speed control needed for the Pi Wars arena. I’ll chronicle my attempts to fix this in a later post.

On theming, I’d love to make it look like a telehandler, but figuring that out feels like trying to run before I can walk, so I’ll tackle that later.


Image credit: Jacquesbotha, CC BY-SA 4.0, via Wikimedia Commons.

Progress so far

I’ve already been working on the project for a while, but so far it’s all been laying groundwork. I’ll follow up with posts on these in the near future:

  • A serial bootloader for the Pico, allowing code upload over serial (rather than the built-in USB bootloader).
  • An ESP32-based WiFi and Bluetooth coprocessor. This provides a WiFi link for code upload and telemetry, and connects to a Bluetooth gamepad for control
  • A PIO-based OV7670 camera interface.
  • A GUI tool which runs on a host computer to upload code, retrieve logs and get camera frames.
  • Basic remote control using all of the above.

Prototype Pico, ESP32 and camera on breadboard

  1. That’s all the rage these days↩︎