This is the documentation for the latest development branch of MicroPython and may refer to features that are not available in released versions.

If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

thingz.thingz_display.Raw

Thingz Display Raw

class thingz.thingz_display.Raw.Raw

Use the LCD to display graphical elements

Img: Raw.Img

Class Img to create an image

Rect: Raw.Rect

Class Rect to create a rectangle

Text: Raw.Text

Class Text to create a text

show() None

Show the raw interface

print(x: int, y: int, txt: str) None

Print text at a given position

Parameters:
  • x (int) – X position

  • y (int) – Y position

  • txt (str) – The text to print

print_bmp(x: int, y: int, path: str) None

Print BMP file at a given position

Parameters:
  • x (int) – X position

  • y (int) – Y position

  • path (str) – The path to the BMP file

class thingz.thingz_display.Raw.Img(x: int, y: int, path: str, white_replacement: int)

Create an image and print it to the screen

Parameters:
  • x (int) – X position

  • y (int) – Y position

  • path (str) – Path to the BMP file

  • white_replacement (int) – Color used to replace white pixels

show(show: bool) None

Show/Hide the image

Parameters:

show (bool) – Show the image if True hide if False

x(pos: int) None

Set x position

Parameters:

pos (int) – x position

y(pos: int) None

Set y position

Parameters:

pos (int) – y position

white_replacement_color(color: bool) None

Change all white pixels to another color

Parameters:

color (int) – color to use as replacement

get_show() bool

Return True if the image is shown

get_x() int

Get x position

get_y() int

Get y position

get_width() int

Get image width

get_height() int

Get image height

get_white_replacement() int

Get color used as white replacement

class thingz.thingz_display.Raw.Rect(x: int, y: int, width: int, height: int, color: int)

Create a rectangle and print it to the screen

Parameters:
  • x (int) – X position

  • y (int) – Y position

  • width (int) – width

  • height (int) – height

  • color (int) – Color

show(show: bool) None

Show/Hide the rectangle

Parameters:

show (bool) – Show the rectangle if True hide if False

x(pos: int) None

Set x position

Parameters:

pos (int) – x position

y(pos: int) None

Set y position

Parameters:

pos (int) – y position

color(color: int) None

Set rectangle color

Parameters:

color (int) – color

get_show() bool

Return True if the rectangle is shown

get_x() int

Get x position

get_y() int

Get y position

get_width() int

Get image width

get_height() int

Get image height

get_color() int

Get color

class thingz.thingz_display.Raw.Text(x: int, y: int, text: str, color: int)

Create an image and print it to the screen

Parameters:
  • x (int) – X position

  • y (int) – Y position

  • text (str) – text

  • color (int) – color

show(show: bool) None

Show/Hide the text

Parameters:

show (bool) – Show the text if True hide if False

x(pos: int) None

Set x position

Parameters:

pos (int) – x position

y(pos: int) None

Set y position

Parameters:

pos (int) – y position

set_text(text: str) None

Set text

Parameters:

text (str) – text

get_show() bool

Return True is text is shown else False

get_x() int

Get x position

get_y() int

Get y position

get_width() int

Get text width

get_height() int

Get text height

get_color() int

Get text color

get_text() int

Get text