MicroPython documentation and references¶
- Quick reference for the openmvcam
- General information about the openmvcam
- OpenMV Cam Tutorial
- 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_thread
– multithreading support
- MicroPython-specific libraries
btree
– simple BTree databasemachine
— 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 OpenMV Cam
pyb
— functions related to the board- Time related functions
- Reset related functions
- Interrupt related functions
- Power related functions
- Miscellaneous functions
- Classes
- 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 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 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
- 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 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 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
time
— tracking elapsed timesensor
— camera sensorimage
— machine vision- class HaarCascade – Feature Descriptor
- class Similarity – Similarity Object
- class Histogram – Histogram Object
- class Percentile – Percentile Object
- class Threshold – Threshold Object
- class Statistics – Statistics Object
- class Blob – Blob object
- class Line – Line object
- class Circle – Circle object
- class Rect – Rectangle Object
- class QRCode – QRCode object
- class AprilTag – AprilTag object
- class DataMatrix – DataMatrix object
- class BarCode – BarCode object
- class Displacement – Displacement object
- class kptmatch – Keypoint Object
- class ImageWriter – ImageWriter object
- class ImageReader – ImageReader object
- class Image – Image object
nn
— neural networks- class nn_class – nn dection result
- class Net – Neural Network
gif
— gif recording- class Gif – Gif recorder
mjpeg
— mjpeg recording- class Mjpeg – Mjpeg recorder
lcd
— lcd shield driverfir
— thermopile shield driver (fir == far infrared)tv
— tv shield drivercpufreq
— CPU Frequency Controlomv
— OpenMV Cam Information
- 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
- MicroPython differences from CPython
- Syntax
- Core Language
- Builtin Types
- Exception
- bytearray
- bytes
- float
- int
- list
- str
- 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