EasyManuals Logo

Adafruit Feather M4 Express User Manual

Adafruit Feather M4 Express
178 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #44 background imageLoading...
Page #44 background image
Congratulations, you've just run your first CircuitPython program!
Editing Code
To edit code, open the code.py file on your CIRCUITPY
drive into your editor.
Make the desired changes to your code. Save the file.
That's it!
Your code changes are run as soon as the file is done saving.
There's just one warning we have to give you before we continue...
The CircuitPython code on your board detects when the files are changed or written and will automatically re-start your
code. This makes coding very fast because you save, and it re-runs.
However, you must wait until the file is done being saved before unplugging or resetting your board! On Windows
using some editors this can sometimes take up to 90 seconds, on Linux it can take 30 seconds to complete because
the text editor does not save the file completely. Mac OS does not seem to have this delay, which is nice!
This is really important to be aware of. If you unplug or reset the board before your computer finishes writing the file to
your board, you can corrupt the drive. If this happens, you may lose the code you've written, so it's important to backup
your code to your computer regularly.
There are a few ways to avoid this:
1. Use an editor that writes out the file completely when you save it.
Recommended editors:
mu (https://adafru.it/Be6) is an editor that safely writes all changes (it's also our recommended editor!)
emacs (https://adafru.it/xNA) is also an editor that will fulIy write files on save (https://adafru.it/Be7)
vim (https://adafru.it/ek9) / vi safely writes all changes
Sublime Text (https://adafru.it/xNB) safely writes all changes
Visual Studio Code (https://adafru.it/Be9) appears to safely write all changes
gedit on Linux appears to safely write all changes
Don't Click Reset or Unplug!
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 49 of 183

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Adafruit Feather M4 Express and is the answer not in the manual?

Adafruit Feather M4 Express Specifications

General IconGeneral
BrandAdafruit
ModelFeather M4 Express
CategoryMicrocontrollers
LanguageEnglish

Related product manuals