CircuitPython

CircuitPython is a derivative of MicroPython designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. The trinket M0 is the second board that comes pre-loaded with CircuitPython. Simply copy and edit files on the CIRCUITPY drive to iterate.

Your Trinket M0 already comes with CircuitPython but maybe there's a new version, or you overwrote your Trinket M0 with Arduino code! In that case, see the below for how to reinstall or update CircuitPython. Otherwise you can skip this and go straight to the next page

If you've already plugged your board into your computer, you should see a drive called CIRCUITPY. The drive will contain a few files. If you want to make a 'backup' of the current firmware on the device, drag-off and save the CURRENT.UF2 file. Other that that you can ignore the index.htm and info_uf2.txt files. They cannot be deleted and are only for informational purposes.

If you have already plugged in your board, start by ejecting or "safely remove" the CIRCUITPY drive. This is a good practice to get into. Always eject before unplugging or resetting your board!

Set up CircuitPython Quick Start!

Follow this quick step-by-step for super-fast Python power :)

Click the link above to download the latest UF2 file.

 

Download and save it to your desktop (or wherever is handy).

Plug your Trinket into your computer using a known-good USB cable.

 

A lot of people end up using charge-only USB cables and it is very frustrating! So make sure you have a USB cable you know is good for data sync.

 

Double-click the small Reset button next to the Trinket M0 name printed on your board, and you will see the Dotstar RGB LED turn green. If it turns red, check the USB cable, try another USB port, etc. Note: The little LED below the USB connector will be red - this is ok!

 

If double-clicking doesn't work the first time, try again. Sometimes it can take a few tries to get the rhythm right!

You will see a new disk drive appear called TRINKETBOOT.

 

 

 

Drag the adafruit_circuitpython_etc.uf2 file to TRINKETBOOT

The red LED will flash. Then, the TRINKETBOOT drive will disappear and a new disk drive called CIRCUITPY will appear.

 

That's it, you're done! :)

Further Information

For more detailed info on installing CircuitPython, check out Installing CircuitPython.

Trinket Default Zip Install

Trinket M0 is limited on space. As you begin working on projects, you may run out of space. Operating systems can create hidden files that take up space. To prevent these files from being added to your Trinket, we suggest installing the Trinket Default Zip.

Click the link above to download the default zip.

 

Download and save it to your desktop, or wherever is handy!

If you haven't already, plug your Trinket into your computer using a known-good USB cable.

 

Make sure your CIRCUITPY drive appears.

Once downloaded, double-click the file to extract the contents.

Double click newly extracted folder to open it.

To load the files that will keep the system from adding hidden files to your drive, highlight these three files:

.fseventsd

.metadata_never_index

.Trashes

 

Drag them to your CIRCUITPY drive. If it asks to replace any, say yes!

If you'd like to reset your Trinket to the same files it shipped with, you can do that with these files. If you changed main.py, and you want to keep your changes, back up main.py first.

Highlight all the files in this folder. Drag them all to your CIRCUITPY drive.

If it asks to replace anything, say yes.

This guide was first published on Aug 23, 2017. It was last updated on Oct 11, 2018. This page (CircuitPython) was last updated on Feb 06, 2018.