Why
MicroPython
Marco Zennaro, PhD
ICTP
Python’s growth
The Economist, July 2018
Python’s growth
Python’s ecosystem
MicroPython
MicroPython is a lean and fast implementation
of the Python 3 programming language that is
optimised to run on a microcontroller.
MicroPython was successfully funded via a
Kickstarter campaign and the software is
now available to the public under the MIT open
source license.
MicroPython
It ensures that the memory size/microcontroller
performance is optimised and fit for purpose
for the application it serves. Many sensor
reading and reporting applications do not
require a PC based processor as this would make
the total application over priced and under-
efficient.
MicroPython options
Adafruit MicroPython webpage
pyBoard
The MicroPython pyboard is a compact
electronic circuit board that runs MicroPython
on the bare metal, giving you a low-level Python
operating system that can be used to control all
kinds of electronic projects.
pyBoard
MicroPython is packed full of advanced features
such as an interactive prompt, arbitrary
precision integers, closures, list comprehension,
generators, exception handling and more. Yet it is
compact enough to fit and run within just 256k
of code space and 16k of RAM.
pyBoard
MicroPython aims to be as compatible with
normal Python as possible to allow you to
transfer code with ease from the desktop to a
microcontroller or embedded system.
pyBoard
pyBoard
pyBoard
pyBoard
pyBoard
ESP8266: low cost
ESP8266: characteristics
802.11 b/g/n, built-in TCP / IP protocol stack
802.11b mode + 19.5dBm output power
Built-in PLL, voltage regulator and power management components
Built-in temperature sensor
Off leakage current is less than 10uA
Standby power consumption of less than 1.0mW
Built-in low-power 32-bit CPU: can double as an application
processor
SDIO 2.0, SPI, UART
BBC Micro:bit
BBC Micro:bit
The Micro Bit is an ARM-based embedded system designed by the
BBC for use in computer education in the UK.
The board has an ARM Cortex-M0 processor, accelerometer and
magnetometer sensors, Bluetooth and USB connectivity, a display
consisting of 25 LEDs, two programmable buttons, and can be
powered by either USB or an external battery pack. The device inputs
and outputs are through five ring connectors that are part of the 23-
pin edge connector.
Digi
Trinket
Feather 32u4 RFM95
Grand Central M4 Express
M5stack
Pycom: WiPy
Pycom: WiPy
Espressif ESP32 chipset
Dual processor + WiFi radio system on chip consuming
25uA
2 x UART, 2 x sPI, I2C, I2S, micro SD card
Analog channels: 8×12 bit ADCs
Hash/Encryption: SHA, MD5, DES, AES
Bluetooth
Memory, RAM: 512KB, External flash: 4MB
Hardware floating point acceleration
Pycom: LoPy4
Pycom: LoPy4
Espressif ESP32 chipset
Quadruple network MicroPython enabled
development board (LoRa, Sigfox, WiFi,
Bluetooth)
RAM: 4MB (vs 512KB)
External flash: 8MB (vs 4MB)
Pycom: Expansion Board
Pycom: PySense
Pycom: PySense
Ambient light sensor
Barometric pressure sensor
Humidity sensor
3 axis 12-bit accelerometer
Temperature sensor
USB port with serial access
LiPo battery charger
MicroSD card compatibility
Ultra low power operation ( 1uA in deep sleep)
Pycom: PyTrack
Pycom: PyTrack
GNSS + Glonass GPS
3 axis 12-bit accelerometer
USB port with serial access
LiPo battery charger
MicroSD ard compatibility
Ultra low power operation ( 1uA in deep sleep)
Summary
We introduced MicroPython.
We learned why it’s the best.
We looked at different boards that support
MicroPython.
We learned about Pycom boards.
Feedback?
Email [email protected]