MicroPython documentation and references¶
- MicroPython libraries
- Python standard libraries and micro-libraries
- Builtin functions and exceptions
array
– arrays of numeric datacmath
– mathematical functions for complex numbersgc
– control the garbage collectormath
– mathematical functionssys
– system specific functionsubinascii
– binary/ASCII conversionsucollections
– collection and container typesuerrno
– system error codesuhashlib
– hashing algorithmsuheapq
– heap queue algorithmuio
– input/output streamsujson
– JSON encoding and decodinguos
– basic “operating system” servicesure
– simple regular expressionsuselect
– wait for events on a set of streamsusocket
– socket moduleussl
– SSL/TLS moduleustruct
– pack and unpack primitive data typesutime
– time related functionsuzlib
– zlib decompression_thread
– multithreading support
- MicroPython-specific libraries
btree
– simple BTree databaseframebuf
— Frame buffer manipulationmachine
— functions related to the hardware- Reset related functions
- Interrupt related functions
- Power related functions
- Miscellaneous functions
- Constants
- Classes
- class Pin – control I/O pins
- class Signal – control and sense external I/O devices
- class ADC – analog to digital conversion
- class ADCChannel — read analog values from internal or external sources
- class UART – duplex serial communication bus
- class SPI – a Serial Peripheral Interface bus protocol (master side)
- class I2C – a two-wire serial protocol
- class RTC – real time clock
- class Timer – control hardware timers
- class WDT – watchdog timer
- class SD – secure digital memory card
micropython
– access and control MicroPython internalsnetwork
— network configurationucryptolib
– cryptographic ciphersuctypes
– access binary data in a structured way
- Libraries specific to the pyboard
pyb
— functions related to the board- Time related functions
- Reset related functions
- Interrupt related functions
- Power related functions
- Miscellaneous functions
- Classes
- class Accel – accelerometer control
- class ADC – analog to digital conversion
- class CAN – controller area network communication bus
- class DAC – digital to analog conversion
- class ExtInt – configure I/O pins to interrupt on external events
- class I2C – a two-wire serial protocol
- class LCD – LCD control for the LCD touch-sensor pyskin
- class LED – LED object
- class Pin – control I/O pins
- class PinAF – Pin Alternate Functions
- class RTC – real time clock
- class Servo – 3-wire hobby servo driver
- class SPI – a master-driven serial protocol
- class Switch – switch object
- class Timer – control internal timers
- class TimerChannel — setup a channel for a timer
- class UART – duplex serial communication bus
- class USB_HID – USB Human Interface Device (HID)
- class USB_VCP – USB virtual comm port
lcd160cr
— control of LCD160CR display
- Libraries specific to the WiPy
- Libraries specific to the ESP8266 and ESP32
- Python standard libraries and micro-libraries
- The MicroPython language
- Glossary
- The MicroPython Interactive Interpreter Mode (aka REPL)
- Writing interrupt handlers
- Maximising MicroPython Speed
- MicroPython on Microcontrollers
- Distribution packages, package management, and deploying applications
- Inline Assembler for Thumb2 architectures
- Document conventions
- Instruction Categories
- 1. Register move instructions
- 2. Load register from memory
- 3. Store register to memory
- 4. Logical & Bitwise instructions
- 5. Arithmetic instructions
- 6. Comparison instructions
- 7. Branch instructions
- 8. Stack push and pop
- 9. Miscellaneous instructions
- 10. Floating Point instructions
- 11. Assembler Directives
- Usage examples
- References
- Developing and building MicroPython
- MicroPython license information
- Quick reference for the pyboard
- General information about the pyboard
- MicroPython tutorial for the pyboard
- 1. Introduction to the pyboard
- 2. Running your first script
- 3. Getting a MicroPython REPL prompt
- 4. Turning on LEDs and basic Python concepts
- 5. The Switch, callbacks and interrupts
- 6. The accelerometer
- 7. Safe mode and factory reset
- 8. Making the pyboard act as a USB mouse
- 9. The Timers
- 10. Inline assembler
- 11. Power control
- Tutorials requiring extra components
- Tips, tricks and useful things to know
- General board control
- Delay and timing
- Internal LEDs
- Internal switch
- Pins and GPIO
- Servo control
- External interrupts
- Timers
- RTC (real time clock)
- PWM (pulse width modulation)
- ADC (analog to digital conversion)
- DAC (digital to analog conversion)
- UART (serial bus)
- SPI bus
- I2C bus
- CAN bus (controller area network)
- Internal accelerometer
- Quick reference for the ESP8266
- General information about the ESP8266 port
- MicroPython tutorial for ESP8266
- 1. Getting started with MicroPython on the ESP8266
- 2. Getting a MicroPython REPL prompt
- 3. The internal filesystem
- 4. Network basics
- 5. Network - TCP sockets
- 6. GPIO Pins
- 7. Pulse Width Modulation
- 8. Analog to Digital Conversion
- 9. Power control
- 10. Controlling 1-wire devices
- 11. Controlling NeoPixels
- 12. Controlling APA102 LEDs
- 13. Temperature and Humidity
- 14. Next steps
- Installing MicroPython
- General board control
- Networking
- Delay and timing
- Timers
- Pins and GPIO
- PWM (pulse width modulation)
- ADC (analog to digital conversion)
- Software SPI bus
- Hardware SPI bus
- I2C bus
- Real time clock (RTC)
- Deep-sleep mode
- OneWire driver
- NeoPixel driver
- APA102 driver
- DHT driver
- WebREPL (web browser interactive prompt)
- Quick reference for the ESP32
- General information about the ESP32 port
- Getting started with MicroPython on the ESP32
- Installing MicroPython
- General board control
- Networking
- Delay and timing
- Timers
- Pins and GPIO
- PWM (pulse width modulation)
- ADC (analog to digital conversion)
- Software SPI bus
- Hardware SPI bus
- I2C bus
- Real time clock (RTC)
- Deep-sleep mode
- OneWire driver
- NeoPixel driver
- Capacitive Touch
- DHT driver
- WebREPL (web browser interactive prompt)
- Quick reference for the WiPy
- General information about the WiPy
- No floating point support
- Before applying power
- WLAN default behaviour
- Telnet REPL
- Local file system and FTP access
- FileZilla settings
- Upgrading the firmware Over The Air
- Boot modes and safe boot
- The heartbeat LED
- Details on sleep modes
- Additional details for machine.Pin
- Additional details for machine.I2C
- Known issues
- WiPy tutorials and examples
- General board control (including sleep modes)
- Pins and GPIO
- Timers
- PWM (pulse width modulation)
- ADC (analog to digital conversion)
- UART (serial bus)
- SPI bus
- I2C bus
- Watchdog timer (WDT)
- Real time clock (RTC)
- SD card
- WLAN (WiFi)
- Telnet and FTP server
- Heart beat LED
- General information about the WiPy