Repository navigation
Initial draft of MicroPython docs #611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| .. toctree:: | ||
| :maxdepth: 3 | ||
|
|
||
| micropython | ||
| upgrading-to-stretch | ||
| spec | ||
| rpyc | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Using python-ev3dev with MicroPython | ||
|
|
||
| The core modules of this library are shipped as a module for [MicroPython](https://micropython.org/), | ||
| which is faster to load and run on the EV3. If your app only requires functionality supported on | ||
| MicroPython, we recommend you run your code with it for improved performance. | ||
|
|
||
| ## Module support | ||
|
|
||
| ```eval_rst | ||
| ============================== ================= | ||
| Module Support status | ||
| ============================== ================= | ||
| `ev3dev2.button` ️️✔️ | ||
| `ev3dev2.control` [1]_ ⚠️ | ||
| `ev3dev2.display` ❌ | ||
| `ev3dev2.fonts` [2]_ ⚠️ | ||
| `ev3dev2.led` ✔️ | ||
| `ev3dev2.motor` ✔️ | ||
| `ev3dev2.port` ✔️ | ||
| `ev3dev2.power` ✔️ | ||
| `ev3dev2.sensor.*` ✔️ | ||
| `ev3dev2.sound` ✔️ | ||
| `ev3dev2.unit` ✔️ | ||
| `ev3dev2.wheel` ✔️ | ||
| ============================== ================= | ||
| .. [1] Untested/low-priority, but some of it might work. | ||
| .. [2] It might work, but isn't useful without ``ev3dev2.display``. | ||
| ``` | ||
|
|
||
| ## Differences from standard Python (CPython) | ||
|
|
||
| See [the MicroPython differences page](http://docs.micropython.org/en/latest/genrst/index.html) for language information. | ||
|
|
||
| ### Shebang | ||
|
|
||
| You should modify the first line of your scripts to replace "python3" with "micropython": | ||
|
|
||
| ``` | ||
| #!/usr/bin/env micropython | ||
| ``` | ||
|
|
||
| ### Running from the command line | ||
|
|
||
| If you previously would have typed `python3 foo.py`, you should now type `micropython foo.py`. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.