Electronics and Software

Hi, everyone! I’m Alex, one of the Electronics and Software leads for the Rolling Robots InvenTeam. Unwisely, I’ve been given a platform to talk about the design process behind our Walker’s software, so here I am, to discuss a little bit of the programming and electronics that power our whole invention. We’ve learned a lot of lessons along the way that define what our project looks like today, and I’m here to discuss one of them.

One of our biggest electronics and software lessons was this: be smart with your microcontrollers. 

From the beginning, we were already annoyingly fated to have to use multiple chips. Our walker depends on a trackable Bluetooth beacon to navigate to its user, and the Bluetooth detection we employed is built into the tiny Adafruit ItsyBitsy chip. As our ‘Master’ chip, bridging the gap between the disparate Bluetooth detectors and opening up more ports for other devices, we installed an Arduino Uno - an immediate problem. Uno chips, for those unaware, are to other microcontrollers as plastic Little Tykes cars are to SUVs: they are lightweight, clunky, and meant to be non-intimidating to young engineers. They're the exact kind of thing Rolling Robots, a kids’ education company, would stock extensively, and they caused our first big problem: our ‘Master’ chip fundamentally could not spare the space or processing power to take raw data from the Bluetooth sensors and make it usable.

In order to solve this catastrophe, we had to offload data-processing to the tiny chips, and then send more sophisticated information over very few wires. This situation birthed one of the defining features of our software: the Command system. On the sending end, the code strung together individual one-byte characters into a six-byte packet: a number belonging to the particular sending sensor, a number denoting the type of data, and space left to transmit three signed digits of information. This little packet was sent over serial - requiring just one wire each direction for communication - and was collected by the receiving chip and unwound, byte by byte, into the exact variable that a specific number should be saved to. Though there’s much to be said about reinventing the wheel here, our Command system, a lightweight emulation of modern console commands, did the job excellently. 

A screenshot of the disassembly side of Command, unwinding the last few bytes of the message into an integer number

Having our computation spread across multiple chips, however well connected, ended up not being workable: in the walker’s modern state, we’ve solved the whole situation by getting ourselves an Arduino Mega as a fully capable Master microcontroller. But to this day, the Command system is how we send raw Bluetooth data across wires, and it remains a trusty piece of code.

Thanks to that lesson and countless others across development, we’ve emerged with a knowledgeable team, an innovative walker, and a dang fine system of chips and software that powers it.