Skip to content

Files

Latest commit

c9ddd75 · Apr 22, 2023

History

History
40 lines (30 loc) · 1.76 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.76 KB

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