CircuitPython for Raspberry Pi and MCUs

Conclusions

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 mailto:mail@bablokb.de.

Buy this article as PDF

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

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • 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.

  • Adafruit IO API

    The Adafruit IO API offers a convenient means for network-ready sensors and other components.

  • BBC micro:bit

    Designed for students, the BBC micro:bit, in conjunction with MicroPython and the Mu editor, can help you get started with microcontroller programming.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News