TUTORIALS Microcontroller projects
Building code for microcontrollers
CIRCUITPYTHON
Les Pounder introduces a version of Python that we can use on the Raspberry Pi and microcontroller boards.
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at bigl.es.
This month we take a look at CircuitPython, a h programming language designed to simplify experimenting with low-cost boards. On a fresh install of Raspberry Pi OS we need to open a terminal and run a few commands to ensure our system is up to date and ready to install CircuitPython:
Then we install/upgrade setuptools, a Python toolkit to manage Python package installations:
Next we make sure we’re in our home directory (/home/pi), then we use the Python packaging tool,
pip3 install --upgrade adafruit-python-shell tool
The final two installation steps are to download an installation script from Adafruit, and then run that script using Python 3:
During the installation it may state that you’re using Python 2. It’ll prompt you to update – do so. After a few minutes CircuitPython will be installed and ready for use.
Project one – flash it baby!