cozmo.lights¶
Helper routines for dealing with Cozmo’s lights and colors.
Classes
Color ([int_color, rgb, name]) |
A Color to be used with a Light. |
Light ([on_color, off_color, on_period_ms, …]) |
Lights are used with LightCubes and Cozmo’s backpack. |
-
cozmo.lights.
off
= <cozmo.lights.Color object>¶ instance representing no color (LEDs off).
Type: Color
-
cozmo.lights.
green_light
= <cozmo.lights.Light object>¶ A steady green colored LED light.
Type: Light
-
cozmo.lights.
white_light
= <cozmo.lights.Light object>¶ A steady white colored LED light.
Type: Light
-
cozmo.lights.
off_light
= <cozmo.lights.Light object>¶ A steady off (non-illuminated LED light).
Type: Light
-
class
cozmo.lights.
Color
(int_color=None, rgb=None, name=None)¶ A Color to be used with a Light.
Either int_color or rgb may be used to specify the actual color. Any alpha components (from int_color) are ignored - all colors are fully opaque.
Parameters:
-
class
cozmo.lights.
Light
(on_color=<cozmo.lights.Color object>, off_color=<cozmo.lights.Color object>, on_period_ms=250, off_period_ms=0, transition_on_period_ms=0, transition_off_period_ms=0)¶ Lights are used with LightCubes and Cozmo’s backpack.
Lights may either be “on” or “off”, though in practice any colors may be assigned to either state (including no color/light).
-
flash
(on_period_ms=250, off_period_ms=250, off_color=<cozmo.lights.Color object>)¶ Convenience function to make a flashing version of an existing Light instance.
Parameters: Returns: Color
instance.
-