CircuitPython for Raspberry Pi and MCUs


Genuine cross-platform programming still does not work perfectly – even with CircuitPython, partly because of the lack of ports for individual libraries and partly because every platform works differently when you get into the details. However, porting overhead is reduced in all cases. If you look at the example in this article, you only need to change the way you define the button, and then the program will also run on the Trinket M0.

The biggest advantage of CircuitPython for the Raspberry Pi is easy access to many hardware components, regardless of whether you adopt the simpler programming model. Prototyping for MCUs is also often easier on the Raspberry Pi than directly on the corresponding hardware. Porting existing Python libraries is also far easier, because CircuitPython provides a stable API for accessing the classic I2C and SPI bus systems.

Programming fun is also crucial, though, and it is here that CircuitPython makes sure to lower the obstacles to getting started on a growing number of platforms.

The Author

Bernhard Bablok works at Allianz Technology SE as an SAP HR developer. When he's not listening to music, cycling or walking, he deals with topics related to Linux, programming and small computers. He can be reached at

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Bluetooth LE

    Bluetooth Low Energy is ideal for networking battery-powered sensors. We show you how to use it on the Raspberry Pi.

  • Pico Sleep Mode

    The Raspberry Pi Pico's high-performance chip is trimmed for I/O and does not try to save power. However, a few tricks in battery mode can keep it running longer.

  • Adafruit PyPortal

    Unlike other displays for the Raspberry Pi, Adafruit's PyPortal touchscreen provides an autonomous environment, including a microprocessor, sound output, and a WiFi connection.

  • Christmas Tinkering

    Make your own Christmas music box with a microcontroller, servomotor, NeoPixel LED ring, and mini-MP3 player.

  • Programmable USB Hub

    The Programmable USB Hub promises to resolve common issues with USB reliability in the short term, making way for future open hardware testing and debugging.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Find SysAdmin Jobs