Now that you've got CircuitPython installed, it's time to try uploading your first new piece of code.

Download Examples

Click the button below to download a zip file containing a collection of sample code for the Circuit Playground Express.

Once downloaded, unzip the file. It should create a folder named examples.

Inside the examples folder, find the file named circuitplayground_pixels_simpletest.py.

Upload Code

Copy the circuitplayground_pixels_simpletest.py file onto the CIRCUITPY drive.

Once it's copied over to the CIRCUITPY drive, rename the circuitplayground_pixels_simpletest.py file to code.py.

What did it do?

The Circuit Playground Express will now restart and the LEDs will display a slowly changing rainbow of color. Congrats - you've just uploaded your first new piece of code!

To see the actual code that's controlling the LEDs, you can open up CIRCUITPY/code.py in a text editor. Learn more about editing CircuitPython files here.

Goal!

You've now installed CircuitPython and uploaded and run your first new piece of code. This is the essential basics of working with Circuit Playground Express & CircuitPython.

Next, we'll look at libraries - which aren't always required, but will definitely be helpful as you learn to write code and interface with hardware.

This guide was first published on Jun 12, 2019. It was last updated on Mar 28, 2024.

This page (Upload Code) was last updated on Mar 28, 2024.

Text editor powered by tinymce.