MicroPython documentation and referencesΒΆ
- 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
- 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 moduleustruct
– pack and unpack primitive data typesutime
– time related functionsuzlib
– zlib decompression
- 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 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
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_HID – USB Human Interface Device (HID)
- class USB_VCP – USB virtual comm port
lcd160cr
— control of LCD160CR display
- 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
- 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
- MicroPython differences from CPython
- Syntax
- Core Language
- Builtin Types
- Exception
- bytearray
- bytes
- float
- int
- list
- str
- UnicodeDecodeError not raised when expected
- Start/end indices such as str.endswith(s, start) not implemented
- Attributes/subscr not implemented
- str(...) with keywords not implemented
- str.ljust() and str.rjust() not implemented
- None as first argument for rsplit such as str.rsplit(None, n) not implemented
- Instance of a subclass of str cannot be compared for equality with an instance of a str
- Subscript with step != 1 is not yet implemented
- tuple
- Modules
- MicroPython license information