europi_display
Classes and definitions for interacting with the OLED display
- class europi_display.Display(*args: Any, **kwargs: Any)
A class for drawing graphics and text to the OLED.
The OLED Display works by collecting all the applied commands and only updates the physical display when
oled.show()
is called. This allows you to perform more complicated graphics without slowing your program, or to perform the calculations for other functions, but only update the display every few steps to prevent lag.To clear the display, simply fill the display with the colour black by using
oled.fill(0)
More explanations and tips about the the display can be found in the oled_tips file oled_tips.md
- centre_text(text, clear_first=True, auto_show=True)
Display one or more lines of text centred both horizontally and vertically.
- Parameters
text – The text to display
clear_first – If true, the screen buffer is cleared before rendering the text
auto_show – If true, oled.show() is called after rendering the text. If false, you must call oled.show() yourself
- rotate(rotate)
Flip the screen from its default orientation
- Parameters
rotate – True or False, indicating whether we want to flip the screen from its default orientation
- class europi_display.DummyDisplay(width, height)
An alternative to Display that provides software compatibility, but no hardware interface
Useful e.g when debugging a breadboard version of the module without a display connected