Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
README.md@9:88f582853243, 2016-04-27 (annotated)
- Committer:
- Colin Hogben
- Date:
- Wed Apr 27 21:34:50 2016 +0100
- Revision:
- 9:88f582853243
- Child:
- 10:33521d742af1
Add README.md
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Colin Hogben |
9:88f582853243 | 1 | This a port of [MicroPython](http://micropython.org) to the mbed Classic |
| Colin Hogben |
9:88f582853243 | 2 | platform. |
| Colin Hogben |
9:88f582853243 | 3 | |
| Colin Hogben |
9:88f582853243 | 4 | This provides an interpreter running on the board's USB serial |
| Colin Hogben |
9:88f582853243 | 5 | connection. |
| Colin Hogben |
9:88f582853243 | 6 | |
| Colin Hogben |
9:88f582853243 | 7 | Getting Started |
| Colin Hogben |
9:88f582853243 | 8 | --------------- |
| Colin Hogben |
9:88f582853243 | 9 | |
| Colin Hogben |
9:88f582853243 | 10 | Import the micropython-repl program into your IDE workspace on |
| Colin Hogben |
9:88f582853243 | 11 | developer.mbed.org. |
| Colin Hogben |
9:88f582853243 | 12 | Compile and download to your board. |
| Colin Hogben |
9:88f582853243 | 13 | Connect to the USB serial port in your usual manner. |
| Colin Hogben |
9:88f582853243 | 14 | You should get a startup message similar to the following: |
| Colin Hogben |
9:88f582853243 | 15 | ``` |
| Colin Hogben |
9:88f582853243 | 16 | MicroPython v1.7-155-gdddcdd8 on 2016-04-23; K64F with ARM |
| Colin Hogben |
9:88f582853243 | 17 | Type "help()" for more information. |
| Colin Hogben |
9:88f582853243 | 18 | >>> |
| Colin Hogben |
9:88f582853243 | 19 | ``` |
| Colin Hogben |
9:88f582853243 | 20 | Then you can start using micropython. For example: |
| Colin Hogben |
9:88f582853243 | 21 | ``` |
| Colin Hogben |
9:88f582853243 | 22 | >>> from mbed import DigitalOut |
| Colin Hogben |
9:88f582853243 | 23 | >>> from pins import LED1 |
| Colin Hogben |
9:88f582853243 | 24 | >>> led = DigitalOut(LED1) |
| Colin Hogben |
9:88f582853243 | 25 | >>> led.write(1) |
| Colin Hogben |
9:88f582853243 | 26 | ``` |
| Colin Hogben |
9:88f582853243 | 27 | |
| Colin Hogben |
9:88f582853243 | 28 | Requirements |
| Colin Hogben |
9:88f582853243 | 29 | ------------ |
| Colin Hogben |
9:88f582853243 | 30 | |
| Colin Hogben |
9:88f582853243 | 31 | You need approximately 100K of flash memory, so this will be no good |
| Colin Hogben |
9:88f582853243 | 32 | for boards with smaller amounts of storage. |
| Colin Hogben |
9:88f582853243 | 33 | |
| Colin Hogben |
9:88f582853243 | 34 | Caveats |
| Colin Hogben |
9:88f582853243 | 35 | ------- |
| Colin Hogben |
9:88f582853243 | 36 | |
| Colin Hogben |
9:88f582853243 | 37 | - This can be considered an alpha release of the port; things may not |
| Colin Hogben |
9:88f582853243 | 38 | work; APIs may change in later releases. It is NOT an official part |
| Colin Hogben |
9:88f582853243 | 39 | part the micropython project, so if anything doesn't work, blame me. |
| Colin Hogben |
9:88f582853243 | 40 | If it does work, most of the credit is due to micropython. |
| Colin Hogben |
9:88f582853243 | 41 | |
| Colin Hogben |
9:88f582853243 | 42 | - Only a few of the mbed classes are available in micropython so far, |
| Colin Hogben |
9:88f582853243 | 43 | and not all methods of those that are. |
| Colin Hogben |
9:88f582853243 | 44 | |
| Colin Hogben |
9:88f582853243 | 45 | - Only a few boards have their full range of pin names available; for |
| Colin Hogben |
9:88f582853243 | 46 | others, only a few standard ones (USBTX, USBRX, LED1) are |
| Colin Hogben |
9:88f582853243 | 47 | implemented. |
| Colin Hogben |
9:88f582853243 | 48 | |
| Colin Hogben |
9:88f582853243 | 49 | - The garbage collector is not yet implemented. The interpreter will |
| Colin Hogben |
9:88f582853243 | 50 | gradually consume memory and then fail. |
| Colin Hogben |
9:88f582853243 | 51 | |
| Colin Hogben |
9:88f582853243 | 52 | - Exceptions from the mbed classes are not yet handled. |
| Colin Hogben |
9:88f582853243 | 53 | |
| Colin Hogben |
9:88f582853243 | 54 | - Asynchronous processing (e.g. events on inputs) is not supported. |
| Colin Hogben |
9:88f582853243 | 55 | |
| Colin Hogben |
9:88f582853243 | 56 | Credits |
| Colin Hogben |
9:88f582853243 | 57 | ------- |
| Colin Hogben |
9:88f582853243 | 58 | |
| Colin Hogben |
9:88f582853243 | 59 | - Damien P. George and other contributors who created micropython. |
| Colin Hogben |
9:88f582853243 | 60 | |
| Colin Hogben |
9:88f582853243 | 61 | - Colin Hogben, author of this port. |