API for the hub built-in display.
More...
|
pbio_error_t | hub_display_orientation (uint8_t up) |
| Sets the orientation of the light matrix display. More...
|
|
pbio_error_t | hub_display_off (void) |
| Turns off all the pixels. More...
|
|
pbio_error_t | hub_display_pixel (uint8_t row, uint8_t column, uint8_t brightness) |
| Turns on one pixel at the specified brightness. More...
|
|
pbio_error_t | hub_display_image (uint8_t *image) |
| Displays an image, represented by a matrix of brightness: % values. More...
|
|
pbio_error_t | hub_display_number (const int8_t num) |
| Displays a number in the range -99 to 99. A minus sign (-) is shown as a faint dot in the center of the display. More...
|
|
pbio_error_t | hub_display_char (const char c) |
| Displays a character or symbol on the light grid. This may be any letter (a–z), capital letter (A–Z) or one of the following symbols: !"#$%&'()*+,-./:;<=>?@[]^_`{|}. More...
|
|
pbio_error_t | hub_display_text (const char *text, uint32_t on, uint32_t off) |
| Displays a text string, one character at a time, with a pause between each character. After the last character is shown, all lights turn off. More...
|
|
pbio_error_t | hub_display_text_scroll (const char *text, uint32_t delay) |
| Displays a text string in scroll mode. More...
|
|
API for the hub built-in display.
◆ hub_display_char()
pbio_error_t hub_display_char |
( |
const char |
c | ) |
|
Displays a character or symbol on the light grid. This may be any letter (a–z), capital letter (A–Z) or one of the following symbols: !"#$%&'()*+,-./:;<=>?@[]^_`{|}.
- Parameters
-
character | (str) The character or symbol to be displayed. |
- Return values
-
◆ hub_display_image()
pbio_error_t hub_display_image |
( |
uint8_t * |
image | ) |
|
Displays an image, represented by a matrix of brightness: % values.
- Parameters
-
matrix | (Matrix) Matrix of intensities (brightness: %). A 2D list is also accepted. |
- Return values
-
◆ hub_display_number()
pbio_error_t hub_display_number |
( |
const int8_t |
num | ) |
|
Displays a number in the range -99 to 99. A minus sign (-) is shown as a faint dot in the center of the display.
- Parameters
-
number(int) | The number to be displayed. |
- Return values
-
◆ hub_display_off()
pbio_error_t hub_display_off |
( |
void |
| ) |
|
Turns off all the pixels.
- Parameters
-
- Return values
-
◆ hub_display_orientation()
pbio_error_t hub_display_orientation |
( |
uint8_t |
up | ) |
|
Sets the orientation of the light matrix display.
- Parameters
-
up | top (Choose PBIO_SIDE_TOP, PBIO_SIDE_LEFT, PBIO_SIDE_RIGHT, PBIO_SIDE_BOTTOM). |
- Return values
-
◆ hub_display_pixel()
pbio_error_t hub_display_pixel |
( |
uint8_t |
row, |
|
|
uint8_t |
column, |
|
|
uint8_t |
brightness |
|
) |
| |
Turns on one pixel at the specified brightness.
- Parameters
-
row(int) | Vertical grid index, starting at 0 from the top. |
column(int) | Horizontal grid index, starting at 0 from the left. |
brightness(brightness | %) Brightness of the pixel. |
- Return values
-
◆ hub_display_text()
pbio_error_t hub_display_text |
( |
const char * |
text, |
|
|
uint32_t |
on, |
|
|
uint32_t |
off |
|
) |
| |
Displays a text string, one character at a time, with a pause between each character. After the last character is shown, all lights turn off.
- Parameters
-
text | (str) The text to be displayed. |
on | (time: ms) For how long a character is shown. |
off | (time: ms) For how long the display is off between characters. |
- Return values
-
◆ hub_display_text_scroll()
pbio_error_t hub_display_text_scroll |
( |
const char * |
text, |
|
|
uint32_t |
delay |
|
) |
| |
Displays a text string in scroll mode.
- Parameters
-
text | (str) The text to be displayed. |
delay | (time: ms) Delay between each scroll. |
- Return values
-