e01.org

MicroPython

MicroPython is a software implementation of a programming language largely compatible with Python 3, written in C, that is optimized to run on a microcontroller. MicroPython consists of a Python compiler to bytecode and a runtime interpreter of that bytecode. The user is presented with an interactive prompt (the REPL) to execute supported commands immediately. Included are a selection of core Python libraries; MicroPython includes modules which give the programmer access to low-level hardware. MicroPython does have an inline assembler, which lets the code run at full speed, but it is not portable across different microcontrollers. The source code for the project is available on GitHub under the MIT License.

MicroPython is a software implementation of a programming language largely compatible with Python 3, written in C, that is optimized to run on a microcontroller. MicroPython consists of a Python compiler to bytecode and a runtime interpreter of that bytecode. The user is presented with an interactive prompt (the REPL) to execute supported commands immediately. Included are a selection of core Python libraries; MicroPython includes modules which give the programmer access to low-level hardware. MicroPython does have an inline assembler, which lets the code run at full speed, but it is not portable across different microcontrollers. The source code for the project is available on GitHub under the MIT License. Print to serial console print("Hello, World!") Importing + turning on a LED: import pyb Turn LED on pyb.LED(1).on() Reading a file + loop: import os Open and read a file with open("/readme.txt") as f: print(f.read()) GOTO 2016 • MicroPython & the Internet of Things • Damien George on YouTube • Tutorials by Tony DiCola / Adafruit

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"MicroPython". 1775234031. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1346930982

JSON record · API collection · citation policy