cozmo.oled_face¶
Cozmo’s OLED screen that displays his face - related functions and values.
Functions
convert_image_to_screen_data(image[, …]) |
Convert an image into the correct format to display on Cozmo’s face. |
convert_pixels_to_screen_data(pixel_data, …) |
Convert a sequence of pixel data to the correct format to display on Cozmo’s face. |
dimensions() |
Return the dimension (width, height) of the oled screen. |
-
cozmo.oled_face.dimensions()¶ Return the dimension (width, height) of the oled screen.
Note: The screen is displayed interlaced, with only every other line displayed This alternates every time the image is changed (no longer than 30 seconds) to prevent screen burn-in. Therefore to ensure the image looks correct on either scan-line offset we use half the vertical resolution
Returns: A tuple of ints (width, height)
-
cozmo.oled_face.convert_pixels_to_screen_data(pixel_data, image_width, image_height)¶ Convert a sequence of pixel data to the correct format to display on Cozmo’s face.
Parameters: Returns: A
bytearrayobject representing all of the pixels (8 pixels packed per byte)Raises: ValueError– Invalid DimensionsValueError– Bad image_widthValueError– Bad image_height