8000 Update README (#212) · sparkfun/circuitpython@f3cd6b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit f3cd6b0

Browse files
willingctannewt
authored andcommitted
Update README (adafruit#212)
* Add README navigation and minor edits * Simplify links * Clean up markdown style warnings * Update links * Edit grammar and style
1 parent aa700a8 commit f3cd6b0

File tree

1 file changed

+183
-82
lines changed

1 file changed

+183
-82
lines changed

README.md

Lines changed: 183 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,213 @@
11
# Adafruit CircuitPython
22

3-
[![Build Status](https://travis-ci.org/adafruit/circuitpython.svg?branch=master)](https://travis-ci.org/adafruit/circuitpython) [![Doc Status](https://readthedocs.org/projects/circuitpython/badge/?version=latest)](http://circuitpython.readthedocs.io/) [![Gitter](https://badges.gitter.im/adafruit/circuitpython.svg)](https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
3+
[![Build Status](https://travis-ci.org/adafruit/circuitpython.svg?branch=master)](https://travis-ci.org/adafruit/circuitpython)
4+
[![Doc Status](https://readthedocs.org/projects/circuitpython/badge/?version=latest)](http://circuitpython.readthedocs.io/)
5+
[![Gitter](https://badges.gitter.im/adafruit/circuitpython.svg)](https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
46
[![Discord](https://img.shields.io/discord/327254708534116352.svg)](https://discord.gg/nBQh6qu)
57

6-
This is an open source derivative of [MicroPython](http://www.micropython.org)
7-
for use on educational development boards designed and sold by [Adafruit](https://www.adafruit.com).
8+
**[Status](#status)** |
9+
**[Supported Boards](#supported-boards)** |
10+
**[Download](#download)** |
11+
**[Documentation](#documentation)** |
12+
**[Contributing](#contributing)** |
13+
**[Differences from Micropython](#differences-from-micropython)** |
14+
**[Project Structure](#project-structure)**
815

9-
As a MicroPython derivative, this implements Python 3.x on microcontrollers such
10-
as the SAMD21 and ESP8266.
16+
**Adafruit CircuitPython** is an open source derivative of
17+
[MicroPython](http://www.micropython.org) for use on educational
18+
development boards designed and sold by [Adafruit](https://www.adafruit.com).
19+
20+
**CircuitPython**, a MicroPython derivative, implements Python 3.x on
21+
microcontrollers such as the SAMD21 and ESP8266.
22+
23+
## Status
1124

12-
## Project Status
1325
This project is in beta. Most APIs should be stable going forward.
1426

15-
### Supported boards
27+
## Supported Boards
28+
29+
### Designed for CircuitPython
30+
31+
* [Adafruit CircuitPlayground Express][]
32+
* [Adafruit Feather M0 Express][]
33+
* [Adafruit Metro M0 Express][]
34+
* [Adafruit Gemma M0][]
1635

17-
#### Designed for CircuitPython
18-
* [Adafruit CircuitPlayground Express](https://www.adafruit.com/product/3333)
19-
* [Adafruit Feather M0 Express](https://www.adafruit.com/product/3403)
20-
* [Adafruit Metro M0 Express](https://www.adafruit.com/product/3505)
21-
* [Adafruit Gemma M0](https://www.adafruit.com/product/3501)
36+
### Other
2237

23-
#### Other
24-
* [Adafruit Feather HUZZAH](https://www.adafruit.com/products/2821)
25-
* [Adafruit Feather M0 Basic](https://www.adafruit.com/products/2772)
26-
* [Adafruit Feather M0 Bluefruit LE](https://www.adafruit.com/products/2995) (uses M0 Basic binaries)
27-
* [Adafruit Feather M0 Adalogger](https://www.adafruit.com/product/2796) (MicroSD card not supported yet.)
28-
* [Arduino Zero](https://www.arduino.cc/en/Main/ArduinoBoardZero)
38+
* [Adafruit Feather HUZZAH][]
39+
* [Adafruit Feather M0 Basic][]
40+
* [Adafruit Feather M0 Bluefruit LE][] (uses M0 Basic binaries)
41+
* [Adafruit Feather M0 Adalogger][] (MicroSD card not supported yet.)
42+
* [Arduino Zero][]
2943

3044
## Download
3145

32-
Official binaries are available through the [latest GitHub releases](https://github.com/adafruit/circuitpython/releases).
33-
Continuous (one per commit) builds are available [here](https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin)
34-
which includes experimental hardware support.
46+
Official binaries are available through the
47+
[latest GitHub releases](https://github.com/adafruit/circuitpython/releases).
48+
Continuous (one per commit) builds are available
49+
[here](https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin)
50+
and includes experimental hardware support.
3551

3652
## Documentation
3753

38-
Guides and videos are available through the [Adafruit Learning System](https://learn.adafruit.com/) under the [CircuitPython category](https://learn.adafruit.com/category/circuitpython) and [MicroPython category](https://learn.adafruit.com/category/micropython). An API reference is also available on [Read the Docs](http://circuitpython.readthedocs.io/en/latest/?).
54+
Guides and videos are available through the [Adafruit Learning System](https://learn.adafruit.com/)
55+
under the [CircuitPython category](https://learn.adafruit.com/category/circuitpython)
56+
and [MicroPython category](https://learn.adafruit.com/category/micropython).
57+
An API reference is also available on [Read the Docs](http://circuitpython.readthedocs.io/en/latest/?).
3958

4059
## Contributing
41-
See [CONTRIBUTING.md](https://github.com/adafruit/circuitpython/blob/master/CONTRIBUTING.md)
42-
for full guidelines but please be aware that by contributing to this project you
43-
are agreeing to the
44-
[Code of Conduct](https://github.com/adafruit/circuitpython/blob/master/CODE_OF_CONDUCT.md).
45-
Contributors who follow the
46-
[Code of Conduct](https://github.com/adafruit/circuitpython/blob/master/CODE_OF_CONDUCT.md)
47-
are welcome to submit pull requests and they will be promptly reviewed by
48-
project admins. Please join the [Gitter chat](https://gitter.im/adafruit/circuitpython) or [Discord](https://discord.gg/nBQh6qu) too.
4960

50-
## Differences from [MicroPython](https://github.com/micropython/micropython)
61+
See [CONTRIBUTING.md](https://github.com/adafruit/circuitpython/blob/master/CONTRIBUTING.md)
62+
for full guidelines but please be aware that by contributing to this
63+
project you are agreeing to the [Code of Conduct][]. Contributors who
64+
follow the [Code of Conduct][] are welcome to submit pull requests and
65+
they will be promptly reviewed by project admins. Please join the
66+
[Gitter chat](https://gitter.im/adafruit/circuitpython) or
67+
[Discord](https://discord.gg/nBQh6qu) too.
68+
69+
---
70+
71+
## Differences from [MicroPython][]
72+
73+
CircuitPython:
74+
75+
* includes a port for Atmel SAMD21 (Commonly known as M0
76+
in Adafruit product names.)
77+
* supports only Atmel SAMD21 and ESP8266 ports.
78+
* tracks MicroPython's releases (not master).
79+
80+
### Behavior
81+
82+
* The order that files are run and the state that is shared between them.
83+
CircuitPython's goal is to clarify the role of each file and make each
84+
file independent from each other.
85+
* `boot.py` (or `settings.py`) runs only once on start up before
86+
USB is initialized. This lays the ground work for configuring USB
87+
at startup rather than it being fixed. Since serial is not
88+
available, output is written to `boot_out.txt`.
89+
* `code.py` (or `main.py`) is run after every reload until it
90+
finishes or is interrupted. After it is done running, the vm and hardware is
91+
reinitialized. **This means you cannot read state from `code.py`
92+
in the REPL anymore.** CircuitPython's goal for this change includes
93+
reduce confusion about pins and memory being used.
94+
* After `code.py` the REPL can be entered by pressing any key. It no
95+
longer shares state with `code.py` so it is a fresh vm.
96+
* Autoreload state will be maintained across reload.
97+
* Adds a safe mode that does not run user code after a hard crash or
98+
brown out. The hope is that this will make it easier to fix code that
99+
causes nasty crashes by making it available through mass storage after
100+
the crash. A reset (the button) is needed after its fixed to get back
101+
into normal mode.
102+
103+
### API
51104

52-
* Port for Atmel SAMD21 (Commonly known as M0 in product names.)
53-
* No `machine` API on Atmel SAMD21 port.
54-
* Only supports Atmel SAMD21 and ESP8266 ports.
55-
* The order that files are run and the state thats shared between them. The goal is to clarify the role of each file and make them independent from each other.
56-
* `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.
57-
* `code.py` (or `main.py`) is run after every reload until it finishes or is interrupted. After its done the vm and hardware is reinitialized. **This means you cannot read state from code.py in the REPL anymore.** This was changed to reduce confusion about pins and memory being in use.
58-
* After code.py the REPL can be entered by pressing any key. It no longer shares state with code.py so its a fresh vm.
59-
* Autoreload state will be maintained across reload.
60-
* Adds a safe mode that does not run user code after a hard crash or brown out. The hope is that this will make it easier to fix code that causes nasty crashes by making it available through mass storage after the crash. A reset (the button) is needed after its fixed to get back into normal mode.
61105
* Unified hardware APIs:
62-
[`audioio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/audioio/__init__.html), [`analogio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/analogio/__init__.html), [`busio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/busio/__init__.html), [`digitalio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/digitalio/__init__.html), [`pulseio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/pulseio/__init__.html), [`touchio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/touchio/__init__.html), [`microcontroller`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/microcontroller/__init__.html), [`board`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/board/__init__.html), [`bitbangio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/bitbangio/__init__.html) (Only available on atmel-samd21 and ESP8266 currently.)
63-
* Tracks MicroPython's releases (not master).
64-
* No module aliasing. (`uos` and `utime` are not available as `os` and `time` respectively.) Instead `os`, `time`, and `random` are CPython compatible.
65-
* New `storage` module which manages file system mounts. (Functionality from `uos` in MicroPython.)
66-
* Modules with a CPython counterpart, such as `time`, `os` and `random`, are strict [subsets](https://circuitpython.readthedocs.io/en/latest/shared-bindings/time/__init__.html) of their [CPython version](https://docs.python.org/3.4/library/time.html?highlight=time#module-time). Therefore, code from CircuitPython is runnable on CPython but not necessarily the reverse.
106+
[`audioio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/audioio/__init__.html),
107+
[`analogio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/analogio/__init__.html),
108+
[`busio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/busio/__init__.html),
109+
[`digitalio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/digitalio/__init__.html),
110+
[`pulseio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/pulseio/__init__.html),
111+
[`touchio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/touchio/__init__.html),
112+
[`microcontroller`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/microcontroller/__init__.html),
113+
[`board`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/board/__init__.html),
114+
[`bitbangio`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/bitbangio/__init__.html) (Only available on atmel-samd21 and ESP8266 currently.)
115+
* No `machine` API on Atmel SAMD21 port.
116+
117+
### Modules
118+
119+
* No module aliasing. (`uos` and `utime` are not available as `os` and
120+
`time` respectively.) Instead `os`, `time`, and `random` are CPython
121+
compatible.
122+
* New `storage` module which manages file system mounts. (Functionality
123+
from `uos` in MicroPython.)
124+
* Modules with a CPython counterpart, such as `time`, `os` and `random`,
125+
are strict [subsets](https://circuitpython.readthedocs.io/en/latest/shared-bindings/time/__init__.html)
126+
of their [CPython version](https://docs.python.org/3.4/library/time.html?highlight=time#module-time).
127+
Therefore, code from CircuitPython is runnable on CPython but not
128+
necessarily the reverse.
67129
* tick count is available as [`time.monotonic()`](https://circuitpython.readthedocs.io/en/latest/shared-bindings/time/__init__.html#time.monotonic)
68-
* atmel-samd21 features
69-
* RGB status LED
70-
* Auto-reload after file write over mass storage. (Disable with `samd.disable_autoreload()`)
71-
* Wait state after boot and main run, before REPL.
72-
* Main is one of these: `code.txt`, `code.py`, `main.py`, `main.txt`
73-
* Boot is one of these: `settings.txt`, `settings.py`, `boot.py`, `boot.txt`
130+
131+
### atmel-samd21 features
132+
133+
* RGB status LED
134+
* Auto-reload after file write over mass storage. (Disable with
135+
`samd.disable_autoreload()`)
136+
* Wait state after boot and main run, before REPL.
137+
* Main is one of these: `code.txt`, `code.py`, `main.py`, `main.txt`
138+
* Boot is one of these: `settings.txt`, `settings.py`, `boot.py`,
139+
`boot.txt`
140+
141+
---
74142

75143
## Project Structure
76-
Here is an overview of the top-level directories.
144+
145+
Here is an overview of the top-level source code directories.
77146

78147
### Core
79-
The core code of MicroPython is shared amongst ports including CircuitPython:
80-
- `docs` High level user documentation in Sphinx reStructuredText format.
81-
- `drivers` External device drivers written in Python.
82-
- `examples` A few example Python scripts.
83-
- `extmod` Shared C code used in multiple ports' modules.
84-
- `lib` Shared core C code including externally developed libraries such as FATFS.
85-
- `logo` The MicroPython logo.
86-
- `mpy-cross` A cross compiler that converts Python files to byte code prior to being run in MicroPython. Useful for reducing library size.
87-
- `py` Core Python implementation, including compiler, runtime, and
148+
149+
The core code of [MicroPython][] is shared amongst ports including
150+
CircuitPython:
151+
152+
* `docs` High level user documentation in Sphinx reStructuredText
153+
format.
154+
* `drivers` External device drivers written in Python.
155+
* `examples` A few example Python scripts.
156+
* `extmod` Shared C code used in multiple ports' modules.
157+
* `lib` Shared core C code including externally developed libraries such
158+
as FATFS.
159+
* `logo` The MicroPython logo.
160+
* `mpy-cross` A cross compiler that converts Python files to byte code
161+
prior to being run in MicroPython. Useful for reducing library size.
162+
* `py` Core Python implementation, including compiler, runtime, and
88163
core library.
89-
- `shared-bindings` Shared definition of Python modules, their docs and backing C APIs. Ports must implement the C API to support the corresponding module.
90-
- `shared-module` Shared implementation of Python modules that may be based on `common-hal`.
91-
- `tests` Test framework and test scripts.
92-
- `tools` Various tools, including the pyboard.py module.
164+
* `shared-bindings` Shared definition of Python modules, their docs and
165+
backing C APIs. Ports must implement the C API to support the
166+
corresponding module.
167+
* `shared-module` Shared implementation of Python modules that may be
168+
based on `common-hal`.
169+
* `tests` Test framework and test scripts.
170+
* `tools` Various tools, including the pyboard.py module.
93171

94172
### Ports
95-
Ports include the code unique to a microcontroller line and also variations
96-
based on the board.
97-
- `atmel-samd` Support for SAMD21 based boards such as [Arduino Zero](https://www.arduino.cc/en/Main/ArduinoBoardZero), [Adafruit Feather M0 Basic](https://www.adafruit.com/products/2772), and
98-
[Adafruit Feather M0 Bluefruit LE](https://www.adafruit.com/products/2995).
99-
- `bare-arm` A bare minimum version of MicroPython for ARM MCUs.
100-
- `cc3200` Support for boards based [CC3200](http://www.ti.com/product/CC3200) from TI such as the [WiPy 1.0](https://www.pycom.io/solutions/py-boards/wipy1/).
101-
- `esp8266` Support for boards based on ESP8266 WiFi modules such as the [Adafruit Feather HUZZAH](https://www.adafruit.com/products/2821).
102-
- `minimal` A minimal MicroPython port. Start with this if you want
173+
174+
Ports include the code unique to a microcontroller line and also
175+
variations based on the board.
176+
177+
* `atmel-samd` Support for SAMD21 based boards such as [Arduino Zero][],
178+
[Adafruit Feather M0 Basic][], and [Adafruit Feather M0 Bluefruit LE][].
179+
* `bare-arm` A bare minimum version of MicroPython for ARM MCUs.
180+
* `cc3200` Support for boards based [CC3200](http://www.ti.com/product/CC3200)
181+
from TI such as the [WiPy 1.0](https://www.pycom.io/solutions/py-boards/wipy1/).
182+
* `esp8266` Support for boards based on ESP8266 WiFi modules such as the
183+
[Adafruit Feather HUZZAH][].
184+
* `minimal` A minimal MicroPython port. Start with this if you want
103185
to port MicroPython to another microcontroller.
104-
- `pic16bit` Support for 16-bit PIC microcontrollers.
105-
- `qemu-arm` Support for ARM emulation through [QEMU](https://qemu.org).
106-
- `stmhal` Support for boards based on STM32 microcontrollers including the MicroPython flagship [PyBoard](https://store.micropython.org/store/#/products/PYBv1_1).
107-
- `teensy` Support for the Teensy line of boards such as the [Teensy 3.1](https://www.pjrc.com/teensy/teensy31.html).
108-
- `unix` Support for UNIX.
109-
- `windows` Support for [Windows](https://www.microsoft.com/en-us/windows/).
110-
- `zephyr` Support for [Zephyr](https://www.zephyrproject.org/), a real-time operating system by the Linux Foundation.
111-
112-
CircuitPython only maintains the `atmel-samd` and `esp8266` ports. The rest are here to maintain compatibility with the [MicroPython](https://github.com/micropython/micropython) parent project.
186+
* `pic16bit` Support for 16-bit PIC microcontrollers.
187+
* `qemu-arm` Support for ARM emulation through [QEMU](https://qemu.org).
188+
* `stmhal` Support for boards based on STM32 microcontrollers including
189+
the MicroPython flagship [PyBoard](https://store.micropython.org/store/#/products/PYBv1_1).
190+
* `teensy` Support for the Teensy line of boards such as the
191+
[Teensy 3.1](https://www.pjrc.com/teensy/teensy31.html).
192+
* `unix` Support for UNIX.
193+
* `windows` Support for [Windows](https://www.microsoft.com/en-us/windows/).
194+
* `zephyr` Support for [Zephyr](https://www.zephyrproject.org/), a
195+
real-time operating system by the Linux Foundation.
196+
197+
CircuitPython only maintains the `atmel-samd` and `esp8266` ports. The
198+
rest are here to maintain compatibility with the
199+
[MicroPython][] parent project.
200+
201+
**[⬆ back to top](#adafruit-circuitpython)**
202+
203+
[Adafruit CircuitPlayground Express]: https://www.adafruit.com/product/3333
204+
[Adafruit Feather M0 Express]: https://www.adafruit.com/product/3403
205+
[Adafruit Metro M0 Express]: https://www.adafruit.com/product/3505
206+
[Adafruit Gemma M0]: https://www.adafruit.com/product/3501
207+
[Adafruit Feather HUZZAH]: https://www.adafruit.com/products/2821
208+
[Adafruit Feather M0 Basic]: https://www.adafruit.com/products/2772
209+
[Adafruit Feather M0 Bluefruit LE]: https://www.adafruit.com/products/2995
210+
[Adafruit Feather M0 Adalogger]: https://www.adafruit.com/product/2796
211+
[Arduino Zero]: https://www.arduino.cc/en/Main/ArduinoBoardZero
212+
[MicroPython]: https://github.com/micropython/micropython
213+
[Code of Conduct]: https://github.com/adafruit/circuitpython/blob/master/CODE_OF_CONDUCT.md

0 commit comments

Comments
 (0)
0