Difference between revisions of "Micropython"
Line 12: | Line 12: | ||
Micropython needs disk space on the microcontroller (or around on the board): 60K | Micropython needs disk space on the microcontroller (or around on the board): 60K | ||
− | + | ||
+ | == Arduino == | ||
+ | The Arduino doesn't "talk" micropython. Its memory is too small. | ||
+ | |||
+ | Uploading always cost time, even for the slightest change in code: compiling and flashing. The memory is always first erased, before putting the new code in. | ||
+ | |||
+ | The code stays on the board. | ||
+ | |||
+ | The file is nicely saved in the Arduino Sketch folder | ||
+ | |||
== micropython - circuit python == | == micropython - circuit python == | ||
Line 26: | Line 35: | ||
https://learn.sparkfun.com/tutorials/micropython-programming-tutorial-getting-started-with-the-esp32-thing/all | https://learn.sparkfun.com/tutorials/micropython-programming-tutorial-getting-started-with-the-esp32-thing/all | ||
− | + | The program is not always saved on the microcontrollers. It is when you drag the file into the disk visible in your laptop. | |
+ | |||
+ | In the MAIX dock editor you have to specifically tell the editor to store the code on the microcontroller. | ||
+ | |||
== Editors == | == Editors == | ||
Line 33: | Line 45: | ||
Mu editor for Adafruit, also microbit https://codewith.mu Errors are displayed in the REPL window. | Mu editor for Adafruit, also microbit https://codewith.mu Errors are displayed in the REPL window. | ||
+ | |||
+ | The MAIX dock has its own editor: https://maixpy.sipeed.com/en/ | ||
+ | |||
+ | OpenMV has its own editor: https://openmv.io | ||
You can also use a text editor and drag the file into the micropython disk | You can also use a text editor and drag the file into the micropython disk | ||
− | |||
== Microcontrollers talking micropython (or CircuitPython)== | == Microcontrollers talking micropython (or CircuitPython)== | ||
Line 52: | Line 67: | ||
*Maix Dock one (30,95) https://www.antratek.nl/sipeed-m1w-ai-dev-board-with-lcd-and-camera | *Maix Dock one (30,95) https://www.antratek.nl/sipeed-m1w-ai-dev-board-with-lcd-and-camera | ||
*BBC Microbit (22,95) https://www.floris.cc/shop/en/home/1848-microbit-go-bundel-microbit.html | *BBC Microbit (22,95) https://www.floris.cc/shop/en/home/1848-microbit-go-bundel-microbit.html | ||
− | *OpenMV7 (75 euro) https://www.antratek.nl/openmv-h7-camera | + | *OpenMV7 (75 euro) https://www.antratek.nl/openmv-h7-camera, https://openmv.io |
*Sparkfun Artemis Thing Plus (25,35) https://www.antratek.nl/artemis-thing-plus | *Sparkfun Artemis Thing Plus (25,35) https://www.antratek.nl/artemis-thing-plus | ||
Line 59: | Line 74: | ||
*Sparkfun Edge (18,09) https://www.antratek.nl/edge-development-board-apollo3-blue | *Sparkfun Edge (18,09) https://www.antratek.nl/edge-development-board-apollo3-blue | ||
− | All these boards can also be programmed using the Arduino IDE | + | All these boards can also be programmed using the Arduino IDE, except for the microbit |
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 01:33, 2 February 2020
Micropython is a hype!
Micropython is a programming language, like C, C++, Code Blocks.
In principle all the languages can do the same sort of thing. In principle all languages have the same type of complexity.
Micropython can be seen as "a conversation with the microcontroller".
You can send it command using code, and it will immediately talk back. You can change a line of code in a program and the change is immediately incorporated.
Micropython needs disk space on the microcontroller (or around on the board): 60K
Arduino
The Arduino doesn't "talk" micropython. Its memory is too small.
Uploading always cost time, even for the slightest change in code: compiling and flashing. The memory is always first erased, before putting the new code in.
The code stays on the board.
The file is nicely saved in the Arduino Sketch folder
micropython - circuit python
Officiel versions http://micropython.org https://circuitpython.org
Adafruit version: https://www.adafruit.com/micropython
Sparkfun version: https://learn.sparkfun.com/tutorials/micropython-programming-tutorial-getting-started-with-the-esp32-thing/all
The program is not always saved on the microcontrollers. It is when you drag the file into the disk visible in your laptop.
In the MAIX dock editor you have to specifically tell the editor to store the code on the microcontroller.
Editors
Online code editor in python for the BBC Microbit: in Chrome (not in Safari or Firefox): https://python.microbit.org/v/2.0. Errors are displayed on the microbit.
Mu editor for Adafruit, also microbit https://codewith.mu Errors are displayed in the REPL window.
The MAIX dock has its own editor: https://maixpy.sipeed.com/en/
OpenMV has its own editor: https://openmv.io
You can also use a text editor and drag the file into the micropython disk
Microcontrollers talking micropython (or CircuitPython)
I have bought and tested these boards myself.
(prices for Dutch shops, Antratek.nl, KIWI-electronics)
- Adafruit circuit playground express (29,95) https://www.adafruit.com/product/3333
- Adafruit feather M0 adalogger (22,93 euro)
- Adafruit Itsy Bitsy M0 (12,04 euro)
- Adafruit Itsy bitsy M4 express (15,70 euro) https://learn.adafruit.com/introducing-adafruit-itsybitsy-m4
- Adafruit Trinket M0 (8,40 euro) https://circuitpython.org/board/trinket_m0/
- Maix Dock one (30,95) https://www.antratek.nl/sipeed-m1w-ai-dev-board-with-lcd-and-camera
- BBC Microbit (22,95) https://www.floris.cc/shop/en/home/1848-microbit-go-bundel-microbit.html
- OpenMV7 (75 euro) https://www.antratek.nl/openmv-h7-camera, https://openmv.io
- Sparkfun Artemis Thing Plus (25,35) https://www.antratek.nl/artemis-thing-plus
- Sparkfun Artemis Nano (19,30) https://www.antratek.nl/redboard-artemis-nano
- Sparkfun Edge (18,09) https://www.antratek.nl/edge-development-board-apollo3-blue
All these boards can also be programmed using the Arduino IDE, except for the microbit