grove.display.base

Display Base Class

Classes

  • Display: All display devices should inherit this virtual class,

class grove.display.base.Display[source]

All display devices should inherit this virtual class, which provide infrastructure such as cursor and backlight inteface, etc.

Inheritance

digraph inheritancec3524f7797 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Display" [URL="#grove.display.base.Display",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="All display devices should inherit this virtual class,"]; }
backlight(enable=None)[source]

Enable or disable the cursor on display device, not all device support it.

Parameters:

enable (bool) – Optional, True to enable, Flase to disable. if not provided, only to get cursor status.

Returns:

backlight status, True - on, False - off.

Return type:

bool

cursor(enable=None)[source]

Enable or disable the backlight on display device, not all device support it.

Parameters:

enable (bool) – Optional, True to enable, Flase to disable. if not provided, only to get cursor status.

Returns:

cursor status, True - on, False - off.

Return type:

bool

Variables

grove.display.base.TYPE_CHAR

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

0
grove.display.base.TYPE_GRAY

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

1
grove.display.base.TYPE_COLOR

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

2
grove.display.base.MAX_GRAY

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

100