@@ -14,25 +14,30 @@ CircuitPython
14
14
computers called microcontrollers. Microcontrollers are the brains of many electronics including a
15
15
wide variety of development boards used to build hobby projects and prototypes. CircuitPython in
16
16
electronics is one of the best ways to learn to code because it connects code to reality. Simply
17
- install CircuitPython on a supported board via drag and drop and then edit a ``code.py `` file on
18
- the CIRCUITPY drive. The code will automatically reload. No software installs are needed besides a
19
- text editor (we recommend `Mu <https://codewith.mu/ >`_ for beginners.)
17
+ install CircuitPython on a supported USB board usually via drag and drop and then edit a ``code.py ``
18
+ file on the CIRCUITPY drive. The code will automatically reload. No software installs are needed
19
+ besides a text editor (we recommend `Mu <https://codewith.mu/ >`_ for beginners.)
20
20
21
- CircuitPython features unified Python core APIs and a growing list of 150+ device libraries and
21
+ Starting with CircuitPython 7.0.0, some boards may only be connectable over Bluetooth Low Energy
22
+ (BLE). Those boards provide serial and file access over BLE instead of USB using open protocols.
23
+ (Some boards may use both USB and BLE.) BLE access can be done from a variety of apps including
24
+ `code.circuitpythonn.org <https://code.circuitpython.org >`_.
25
+
26
+ CircuitPython features unified Python core APIs and a growing list of 300+ device libraries and
22
27
drivers that work with it. These libraries also work on single board computers with regular
23
28
Python via the `Adafruit Blinka Library <https://github.com/adafruit/Adafruit_Blinka >`_.
24
29
25
30
CircuitPython is based on `MicroPython <https://micropython.org >`_. See
26
- `below <#differences-from-micropython >`_ for differences. CircuitPython development is sponsored by
27
- `Adafruit <https://adafruit.com >`_ and is available on their educational development boards. Please
28
- support both MicroPython and Adafruit.
31
+ `below <#differences-from-micropython >`_ for differences. Most, but not all, CircuitPython
32
+ development is sponsored by `Adafruit <https://adafruit.com >`_ and is available on their educational
33
+ development boards. Please support both MicroPython and Adafruit.
29
34
30
35
Get CircuitPython
31
36
------------------
32
37
33
38
Official binaries for all supported boards are available through
34
39
`circuitpython.org/downloads <https://circuitpython.org/downloads >`_. The site includes stable, unstable and
35
- continuous builds. Full release notes and assets are available through
40
+ continuous builds. Full release notes are available through
36
41
`GitHub releases <https://github.com/adafruit/circuitpython/releases >`_ as well.
37
42
38
43
Documentation
@@ -85,7 +90,9 @@ If you'd like to use the term "CircuitPython" and Blinka for your product here i
85
90
* Your product is listed on `circuitpython.org <https://circuitpython.org >`__ (source
86
91
`here <https://github.com/adafruit/circuitpython-org/ >`_). This is to ensure that a user of your
87
92
product can always download the latest version of CircuitPython from the standard place.
88
- * Your product has a user accessible USB plug which appears as a CIRCUITPY drive when plugged in.
93
+ * Your product has a user accessible USB plug which appears as a CIRCUITPY drive when plugged in
94
+ AND/OR provides file and serial access over Bluetooth Low Energy. Boards that do not support USB
95
+ should be clearly marked as BLE-only CircuitPython.
89
96
90
97
If you choose not to meet these requirements, then we ask you call your version of CircuitPython
91
98
something else (for example, SuperDuperPython) and not use the Blinka logo. You can say it is
@@ -98,10 +105,11 @@ Differences from `MicroPython <https://github.com/micropython/micropython>`__
98
105
99
106
CircuitPython:
100
107
101
- - Supports native USB on all boards, allowing file editing without special tools.
108
+ - Supports native USB on most boards and BLE otherwise , allowing file editing without special tools.
102
109
- Floats (aka decimals) are enabled for all builds.
103
110
- Error messages are translated into 10+ languages.
104
- - Does not support concurrency within Python (including interrupts and threading). Some concurrency
111
+ - Concurrenncy within Python is not well supported. Interrupts and threading are disabled.
112
+ async/await keywords are available on some boards for cooperative multitasking. Some concurrency
105
113
is achieved with native modules for tasks that require it such as audio file playback.
106
114
107
115
Behavior
@@ -110,23 +118,23 @@ Behavior
110
118
- The order that files are run and the state that is shared between
111
119
them. CircuitPython's goal is to clarify the role of each file and
112
120
make each file independent from each other.
113
- - `` boot.py `` (or `` settings.py ``) runs only once on start up before
114
- USB is initialized. This lays the ground work for configuring USB at
115
- startup rather than it being fixed. Since serial is not available,
116
- output is written to `` boot_out.txt ``.
117
- - `` code.py `` (or `` main.py ``) is run after every reload until it
118
- finishes or is interrupted. After it is done running, the vm and
119
- hardware is reinitialized. ** This means you cannot read state from **
120
- `` code.py `` ** in the REPL anymore, as the REPL is a fresh vm. ** CircuitPython's goal for this
121
- change includes reducing confusion about pins and memory being used.
122
- - After the main code is finished the REPL can be entered by pressing any key .
123
- - Autoreload state will be maintained across reload .
124
- - Adds a safe mode that does not run user code after a hard crash or
125
- brown out. The hope is that this will make it easier to fix code that
126
- causes nasty crashes by making it available through mass storage
127
- after the crash. A reset (the button) is needed after it's fixed to
128
- get back into normal mode.
129
- - RGB status LED indicating CircuitPython state, and errors through a sequence of colored flashes .
121
+
122
+ - `` boot.py `` (or `` settings.py ``) runs only once on start up before
123
+ USB is initialized. This lays the ground work for configuring USB at
124
+ startup rather than it being fixed. Since serial is not available,
125
+ output is written to `` boot_out.txt ``.
126
+ - `` code.py `` (or `` main.py ``) is run after every reload until it
127
+ finishes or is interrupted. After it is done running, the vm and
128
+ hardware is reinitialized. ** This means you cannot read state from **
129
+ `` code.py `` ** in the REPL anymore, as the REPL is a fresh vm. ** CircuitPython's goal for this
130
+ change includes reducing confusion about pins and memory being used .
131
+ - After the main code is finished the REPL can be entered by pressing any key .
132
+ - Autoreload state will be maintained across reload.
133
+
134
+ - Adds a safe mode that does not run user code after a hard crash or brown out. This makes it
135
+ possible to fix code that causes nasty crashes by making it available through mass storage after
136
+ the crash. A reset (the button) is needed after it's fixed to get back into normal mode.
137
+ - RGB status LED indicating CircuitPython state.
130
138
- Re-runs ``code.py `` or other main file after file system writes over USB mass storage. (Disable with
131
139
``supervisor.disable_autoreload() ``)
132
140
- Autoreload is disabled while the REPL is active.
140
148
141
149
- Unified hardware APIs. Documented on
142
150
`ReadTheDocs <https://circuitpython.readthedocs.io/en/latest/shared-bindings/index.html >`_.
143
- - API docs are rST within the C files in ``shared-bindings ``.
151
+ - API docs are Python stubs within the C files in ``shared-bindings ``.
144
152
- No ``machine `` API.
145
153
146
154
Modules
0 commit comments