Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Adafruit Logo
0
Adafruit Trinket M0 "Uninstalling" CircuitPython

Adafruit Trinket M0

CircuitPython or Arduino IDE on this tiny little microcontroller board

Image for user adafruit2
published August 23, 2017, last edited June 24, 2025
Save Link Note Download
161
Beginner
Product guide

"Uninstalling" CircuitPython

A lot of our boards can be used with multiple programming languages. For example, the Circuit Playground Express can be used with MakeCode, Code.org CS Discoveries, CircuitPython and Arduino.

Maybe you tried CircuitPython and want to go back to MakeCode or Arduino? Not a problem. You can always remove or reinstall CircuitPythonwhenever you want! Heck, you can change your mind every day!

There is nothing to uninstall. CircuitPython is "just another program" that is loaded onto your board. You simply load another program (Arduino or MakeCode) and it will overwrite CircuitPython.

Backup Your Code

Before replacing CircuitPython, don't forget to make a backup of the code you have on theCIRCUITPY drive. That means yourcode.py any other files, thelib folder etc. You may lose these files when you remove CircuitPython, so backups are key! Just drag the files to a folder on your laptop or desktop computer like you would with any USB drive.

Moving Circuit Playground Express to MakeCode

On the Circuit Playground Express (this currently does NOT apply to Circuit Playground Bluefruit), if you want to go back to using MakeCode, it's really easy. Visitmakecode.adafruit.com and find the program you want to upload. Click Download to download the.uf2 file that is generated by MakeCode.

Now double-click your CircuitPython board until you see the onboard LED(s) turn green and the...BOOT directory shows up.

Then find the downloaded MakeCode.uf2 file and drag it to the CPLAYBOOT drive.

Your MakeCode is now running and CircuitPython has been removed. Going forward you only have tosingle click the reset button to get toCPLAYBOOT. This is an idiosyncrasy of MakeCode.

Moving to Arduino

If you want to use Arduino instead, you just use the Arduino IDE to load an Arduino program. Here's an example of uploading a simple "Blink" Arduino program, but you don't have to use this particular program.

Start by plugging in your board, and double-clicking reset until you get the green onboard LED(s).

Within Arduino IDE, select the matching board, say Circuit Playground Express.

circuitpython_circuit_playground_boardsel.png

Select the correct matching Port:

circuitpython_circuit_playground_cpxport.png

Create a new simple Blink sketch example:

// the setup function runs once when you press reset or power the boardvoid setup() {  // initialize digital pin 13 as an output.  pinMode(13, OUTPUT);}// the loop function runs over and over again forevervoid loop() {  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)  delay(1000);              // wait for a second  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW  delay(1000);              // wait for a second}
// the setup function runs once when you press reset or power the boardvoid setup() {  // initialize digital pin 13 as an output.  pinMode(13, OUTPUT);}// the loop function runs over and over again forevervoid loop() {  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)  delay(1000);              // wait for a second  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW  delay(1000);              // wait for a second}

Make sure the LED(s) are still green, then clickUpload to upload Blink. Once it has uploaded successfully, the serial Port will change sore-select the new Port!

Once Blink is uploaded you should no longer need to double-click to enter bootloader mode. Arduino will automatically reset when you upload.

Page last edited June 21, 2024

Text editor powered bytinymce.

Related Guides
Search

Search

Categories

[8]ページ先頭

©2009-2025 Movatter.jp