/pico-oled-1.3-driver

yet another (but hopefully better) Micrypython Driver for the Waveshare pico-oled-1.3

Primary LanguagePython

MicroPython Driver for the Waveshare Pico OLED 1.3

This is (hopefully) an improved MicroPython driver for the Waveshare Pico-Oled-1.3 derived from the one provided by Waveshare.

Features

  • Derived from the MicroPython Driver for the pico OLED 1.3 by Waveshare.
  • Initialization and access to the state of key0 and key1 via the display object.
  • Better character display capabilities:
    • Better fixed and variable width fonts than the build-in font provided by framebuf.
    • Better text function:
      • Automatic wrapping of text.
      • Returns endpoint coordinates of last written character.

Usage

  • Connect the display to the Raspberry Pi Pico W.
  • Flash the Pico W with the latest MicroPython.
  • Copy the codebase to the Raspberry Pi Pico or (Pico W).
  • Use as below:
>>> import PicoOled13
>>> display=PicoOled13.get()
>>> display.clear()
>>> if display.is_pressed(display.KEY0):
>>>     loc=display.text("Key0 pressed",0,0,0xffff):
>>> if display.is_pressed(display.KEY1):
>>>     loc=display.text("Key1 pressed too",0,loc[1],0xffff):
>>> display.show()

Acknowledgements