This is the website for an older EuroPython. Looking for the latest EuroPython? Click here!
Skip to main content

Async Robots

Level:
beginner
Room:
south hall 2b
Start:
Duration:
30 minutes

Abstract

Interactive control of robots can be a challenge, as it requires a lot of things to happen in parallel while at the same time reacting to data from sensors and control signals. Using python's async facilities may greatly simplify this task, allowing us to write code that is similar to the non-parallel version, but that is at the same time easy to compose into bigger program doing many things at once. I will talk about my own experiences programming the Fluffbug robot with CircuitPython, point out the problems and the solutions I found.

TalkMakers, Microcontrollers and IoT

Description

Fluffbug is a small, affordable walking robot programmed with CircuitPython. The way it moves and reacts to sensors and control signals requires code that seemingly does a lot of things all at once, but we don't have direct access to mechanisms like threads or interrupts. What we use instead is Python's async syntax and the minimal version of asyncio library available in CircuitPython. This makes an interesting use case for asynchronous programming that is different from the usual web servers and API frontends. The resulting code is much shorter and easier to maintain than similar code written in a traditional, linear way.


The speaker

Radomir Dopieralski

Radomir Dopieralski

A Python programmer by day, by night turns into a supervillain constructing insectoid robots, handheld game consoles, custom keyboards and other projects. He sometimes haunts the Swiss Mechatronic Art Society and tries to convert everyone to using CircuitPython.


← Back to schedule