Doc Status Discord circuitpython.org | Get CircuitPython | Documentation | Contributing | Branding | Differences from Micropython | Project Structure
CircuitPython is a beginner friendly, open source version of Python for tiny, inexpensive
computers called microcontrollers. Microcontrollers are the brains of many electronics including a
wide variety of development boards used to build hobby projects and prototypes. CircuitPython in
electronics is one of the best ways to learn to code because it connects code to reality. Simply
install CircuitPython on a supported board via drag and drop and then edit a code.py file on
the CIRCUITPY drive. The code will automatically reload. No software installs are needed besides a
text editor (we recommend Adafruit Blinka Library.
CircuitPython is based on below for differences. CircuitPython development is sponsored by Get CircuitPython
Official binaries for all supported boards are available through GitHub releases as well.
Guides and videos are available through the CircuitPython category. An API reference is also available on Awesome CircuitPython.
Specifically useful documentation when starting out:
See Code of Conduct. Contributors who follow the Discord too.
While we are happy to see CircuitPython forked and modified, we'd appreciate it if forked releases not use the name "CircuitPython" or the Blinka logo. "CircuitPython" means something special to us and those who learn about it. As a result, we'd like to make sure products referring to it meet a common set of requirements.
If you'd like to use the term "CircuitPython" and Blinka for your product here is what we ask:
If you choose not to meet these requirements, then we ask you call your version of CircuitPython something else (for example, SuperDuperPython) and not use the Blinka logo. You can say it is "CircuitPython-compatible" if most CircuitPython drivers will work with it.
boot.py (or settings.py) runs only once on start up before
USB is initialized. This lays the ground work for configuring USB at
startup rather than it being fixed. Since serial is not available,
output is written to boot_out.txt.code.py (or main.py) is run after every reload until it
finishes or is interrupted. After it is done running, the vm and
hardware is reinitialized. This means you cannot read state from
code.py in the REPL anymore. CircuitPython's goal for this
change includes reduce confusion about pins and memory being used.code.py the REPL can be entered by pressing any key. It no
longer shares state with code.py so it is a fresh vm.code.py or other main file after file system writes over USB mass storage. (Disable with
samd.disable_autoreload())code.txt, code.py, main.py,
main.txt
settings.txt, settings.py, boot.py,
boot.txt
uos and utime are not available as
os and time respectively.) Instead os, time, and
random are CPython compatible.storage module which manages file system mounts.
(Functionality from uos in MicroPython.)time, os and
random, are strict
CPython
version.
Therefore, code from CircuitPython is runnable on CPython but not
necessarily the reverse.Here is an overview of the top-level source code directories.
Ports include the code unique to a microcontroller line and also variations based on the board.
atmel-samd Support for SAMD21 and SAMD51 based boards.nrf Support for the nRF52840 based boards.unix Support for UNIX. Only used for automated testing.The remaining port directories not listed above are in the repo to maintain compatibility with the back to top
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。