CircuitPython is a programming language designed to simplify experimenting and learning to program on low-cost microcontroller boards. CircuitPython is Adafruit’s open source derivative of MicroPython. This version of MicroPython was created to add support for easily getting started with electronics using boards like Circuit Playground Express, Trinket M0, Gemma M0, and more.
Python is the fastest growing programming language. It’s a high-level programming language which means it’s designed to be easier to read, write and maintain. It supports modules and packages which means it’s easy to reuse your code for other projects. It has a built in interpreter which means there are no extra steps, like compiling, to get your code to work. And of course, Python is Open Source Software which means it’s free for anyone to use, modify or improve upon. CircuitPython adds hardware support to all of these amazing features.
Differences from MicroPython
- includes a ports for MicroChip SAMD21 (Commonly known as M0 in Adafruit product names) and SAMD51 (M4).
- supports only SAMD21, SAMD51, and ESP8266 ports. An nRF port is under development.
- tracks MicroPython’s releases (not master).
- Longints (arbitrary-length integers) are enabled for most M0 Express boards (those boards with SPI flash chips external to the microcontroller), and for all M4 builds. Longints are disabled on other boards due to lack of flash space.
Reasons to use CircuitPython
- You want to get up and running quickly. Create a file, edit your code, save the file, and it runs immediately. There is no compiling, no downloading and no uploading needed.
- You’re new to programming. CircuitPython is designed with education in mind. It’s easy to start learning how to program and you get immediate feedback from the board.
- Easily update your code. Since your code lives on the disk drive, you can edit it whenever you like, you can also keep multiple files around for easy experimentation.
- The serial console and REPL. These allow for live feedback from your code and interactive programming.
- File storage. The internal storage for CircuitPython makes it great for data-logging, playing audio clips, and otherwise interacting with files.
- Strong hardware support. There are many libraries and drivers for sensors, breakout boards and other external components.
- It’s Python! Python is the fastest-growing programming language. It’s taught in schools and universities. CircuitPython is almost-completely compatible with Python. It simply adds hardware support.