EvoOLED#

class EvoOLED(i2c, channel, addr=0x3C)#

SSD1306-style 128 x 64 monochrome OLED display. EvoOLED subclasses framebuf.FrameBuffer, so standard MicroPython framebuffer drawing methods are also available.

begin()#

Initialise the OLED controller, clear the buffer and draw the empty screen.

Returns:

True.

show()#
drawDisplay()#

Flush the framebuffer to the display.

Returns:

None.

clearDisplay()#

Clear the framebuffer and update the display.

Returns:

None.

poweron()#
poweroff()#

Turn the panel output on or off.

Returns:

None.

sleep(value)#

Put the display to sleep when value is truthy, or wake it when false.

Returns:

None.

setContrast(value)#

Set display contrast. Values are clamped to 0 through 255.

Returns:

None.

invertDisplay(invert=True)#

Enable or disable inverse display mode.

Returns:

None.

setFlipOrientation(flip=False, draw=True)#
flipDisplayOrientation(flip=None)#

Set or toggle the display orientation. When draw is true, or when using flipDisplayOrientation(), the display is refreshed.

Returns:

None.

setFontSize(size)#

Select the built-in bitmap font size. Unsupported sizes fall back to size 7.

Returns:

None.

writeToDisplay(value, x, y, clear=False, draw=False)#

Draw text at a pixel position. clear clears the buffer first and draw flushes the display after drawing.

Returns:

None.

writeLineToDisplay(value, line, clear=False, draw=False)#

Draw text at the start of a text line calculated from the selected font size.

Returns:

None.

drawPixel(x, y, clear=False, draw=False)#
drawLine(x0, y0, x1, y1, clear=False, draw=False)#
drawRect(x, y, w, h, fill=False, clear=False, draw=False)#
drawCircle(x, y, r, fill=False, clear=False, draw=False)#
drawTriangle(x0, y0, x1, y1, x2, y2, clear=False, draw=False)#

Draw common primitives into the framebuffer. clear draws with color 0 instead of 1; draw refreshes the OLED after the operation.

Returns:

None.