MicroPython documentation and references¶
- Quick reference for the pyboard
- General information about the pyboard
- MicroPython tutorial
- 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
- MicroPython libraries
- Python standard libraries and micro-libraries
- Builtin Functions
cmath
– mathematical functions for complex numbersgc
– control the garbage collectormath
– mathematical functionsselect
– wait for events on a set of streamssys
– system specific functionsubinascii
– binary/ASCII conversionsucollections
– collection and container typesuhashlib
– hashing algorithmuheapq
– heap queue algorithmuio
– input/output streamsujson
– JSON encoding and decodinguos
– basic “operating system” servicesure
– regular expressionsusocket
– socket moduleustruct
– pack and unpack primitive data typesutime
– time related functionsuzlib
– zlib decompression
- MicroPython-specific libraries
machine
— functions related to the board- Reset related functions
- Interrupt related functions
- Power related functions
- Miscellaneous functions
- Constants
- Classes
- class ADC – analog to digital conversion
- class ADCChannel — read analog values from internal or external sources
- class I2C – a two-wire serial protocol
- class Pin – control I/O pins
- class RTC – real time clock
- class SD – secure digital memory card
- class SPI – a master-driven serial protocol
- class Timer – control internal timers
- class TimerChannel — setup a channel for a timer
- class UART – duplex serial communication bus
- class WDT – watchdog timer
micropython
– access and control MicroPython internalsnetwork
— network configurationuctypes
– 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_VCP – USB virtual comm port
- Python standard libraries and micro-libraries
- The pyboard hardware
- Datasheets for the components on the pyboard
- Datasheets for other components
- MicroPython license information
- MicroPython documentation contents
- Quick reference for the pyboard
- General information about the pyboard
- MicroPython tutorial
- 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
- MicroPython libraries
- Python standard libraries and micro-libraries
- Builtin Functions
cmath
– mathematical functions for complex numbersgc
– control the garbage collectormath
– mathematical functionsselect
– wait for events on a set of streamssys
– system specific functionsubinascii
– binary/ASCII conversionsucollections
– collection and container typesuhashlib
– hashing algorithmuheapq
– heap queue algorithmuio
– input/output streamsujson
– JSON encoding and decodinguos
– basic “operating system” servicesure
– regular expressionsusocket
– socket moduleustruct
– pack and unpack primitive data typesutime
– time related functionsuzlib
– zlib decompression
- MicroPython-specific libraries
machine
— functions related to the board- Reset related functions
- Interrupt related functions
- Power related functions
- Miscellaneous functions
- Constants
- Classes
- class ADC – analog to digital conversion
- class ADCChannel — read analog values from internal or external sources
- class I2C – a two-wire serial protocol
- class Pin – control I/O pins
- class RTC – real time clock
- class SD – secure digital memory card
- class SPI – a master-driven serial protocol
- class Timer – control internal timers
- class TimerChannel — setup a channel for a timer
- class UART – duplex serial communication bus
- class WDT – watchdog timer
micropython
– access and control MicroPython internalsnetwork
— network configurationuctypes
– 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_VCP – USB virtual comm port
- Python standard libraries and micro-libraries
- The MicroPython language
- The MicroPython Interactive Interpreter Mode (aka REPL)
- Writing interrupt handlers
- Maximising Python Speed
- 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
- The pyboard hardware
- Datasheets for the components on the pyboard
- Datasheets for other components
- MicroPython license information