not logged in | [Login]

Welcome to the MicroPython Wiki!

These pages host community generated documentation and examples of the features of MicroPython and the pyboard. We welcome your contributions.

Are You a New User?

If so, here's the basic stuff you need to read and know:

Dive Deeper

Community Contributed Projects to wet your appetite and spark ideas:

Libraries for External Devices

Usually you will want to connect different devices to your microcontroller, like sensors, displays, actuators and much more. Here you can find modules for different devices.

Official Accessories

  • Bluetooth module HC05

  • Drivers in the MicroPython source tree. These may be found under drivers:

    • NRF24L01 Provides two way checksummed radio communications with auto-retry in the 2.4GHz ISM band.

    • OneWire: generic driver for devices using the OneWire bus

    • CC3000 and CC3100: WiFi drivers

    • Display drivers: The official LCD touch display uses the LCD160CR controller. SSD1306 OLED devices are also supported.

    • DHT11 and DHT22 temperature and humidity sensors

    • SD card: supports SD cards connected by SPI bus.

Other Devices

Networking

  • Network Protocol: SNMP, tested WiPy only

  • MQTT A publish/subscribe protocol for the internet of things. Two projects:

    1. A "resilient" asynchronous client capable of coping with WiFi outages.
    2. Using a cheap ESP8266 as an interface, enables a target lacking a network interface (e.g. Pyboard) to be an asynchronous MQTT client.

General Code Examples

Asynchronous programming and device drivers

  • Cooperative scheduling using uasyncio Resources include a tutorial, drivers for debounced switches and pushbuttons with optional push, release, double-click and long press events, and a set of synchronisation primitives. It also provides a modification to uasyncio offering a way to write applications with improved realtime performance. Also supports low current draw applications.
  • HTU21D temperature/humidity sensor
  • IR Remote Control The file aremote.py supports IR remotes using the NEC protocol.
  • GPS An asynchronous driver for GPS devices which connect via a UART. Includes a class to enable the GPS chip's behaviour to be altered (for hardware based on MTK3329/MTK3339 chips).
  • HD44780 LCD displays An asynchronous driver for these popular character-based displays.

Utilities

  • rshell Enables access to a MicroPython target via USB or a network connection. Enables maintenance of the filesystem using Unix-like commands. Also provides a REPL prompt.
  • Convert fonts to Python source A PC utility to convert ttf and otf files to MicroPython source which may optionally be frozen as bytecode. The file format is offered as a proposed standard.
  • data_to_py Converts an arbitrary binary data file to Python source which may be frozen as bytecode. This conserves RAM.
  • micropip A PC program for downloading MicroPython packages from PyPi. Runs under Python 3.2 or above. The package is put in a directory of your choice for subsequent transfer to target hardware.

Structured Detail

References