pyzenbo.modules.wheel_lights module¶
-
class
pyzenbo.modules.wheel_lights.
Lights
¶ Bases:
object
-
SYNC_BOTH
= 0¶
-
ASYNC_LEFT
= 1¶
-
ASYNC_RIGHT
= 2¶
-
-
class
pyzenbo.modules.wheel_lights.
Direction
¶ Bases:
object
-
DIRECTION_FORWARD
= 0¶
-
DIRECTION_BACKWARD
= 1¶
-
-
class
pyzenbo.modules.wheel_lights.
Speed
¶ Bases:
object
-
SPEED_DEFAULT
= 0¶
-
SPEED_SLOWER_1
= 1¶
-
SPEED_SLOWER_2
= 2¶
-
SPEED_FASTER_1
= -1¶
-
SPEED_FASTER_2
= -2¶
-
-
class
pyzenbo.modules.wheel_lights.
WheelLights
(inter_comm)¶ Bases:
object
-
set_color
(lights, active, color, sync=True, timeout=None)¶ Set the color of wheel LEDs.
- Parameters
lights – wheel lights ID
active – bitmap array of selected LED. bit7~bit0 corresponding LED7~LED0. Set the correspond bit to specify the selected LEDs. <br>In Zenbo junior, bit6~bit0 corresponding LED6~LED0. Set the correspond bit to specify the selected LEDs. Bit 7 is applied immediately: 1: applied immediately, 0: applied on next pattern starting.
color – color value in RGB format (e.g. RED is 0x00ff0000, GREEN is 0x0000ff00, BLUE is 0x000000ff)
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_static
(lights, sync=True, timeout=None)¶ Start the static pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_strobing
(lights, speed, sync=True, timeout=None)¶ Start the strobing pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_breath
(lights, speed, sync=True, timeout=None)¶ Start the breath pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_color_cycle
(lights, speed, sync=True, timeout=None)¶ Start the color cycle pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
speed – speed level speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_rainbow
(lights, direction, speed, sync=True, timeout=None)¶ Start the rainbow pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
direction – forward or backward forward or backward
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_breath_rainbow
(lights, speed, sync=True, timeout=None)¶ Start the breath rainbow pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_comet
(lights, direction, speed, sync=True, timeout=None)¶ Start the comet pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
direction – forward or backward
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_rainbow_comet
(lights, direction, speed, sync=True, timeout=None)¶ Start the rainbow comet pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
direction – forward or backward
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_moving_flash
(lights, direction, speed, sync=True, timeout=None)¶ Start the moving flash pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
direction – forward or backward
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_flash_dash
(lights, direction, speed, sync=True, timeout=None)¶ Start the flash dash pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
direction – forward or backward
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_rainbow_wave
(lights, direction, speed, sync=True, timeout=None)¶ Start the rainbow wave pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
direction – forward or backward
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_glowing_yoyo
(lights, speed, sync=True, timeout=None)¶ Start the glowing yoyo pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_starry_night
(lights, speed, sync=True, timeout=None)¶ Start the starry night pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
start_wave
(lights, speed, sync=True, timeout=None)¶ Start the wave pattern action. Only support in Zenbo junior.
- Parameters
lights – wheel lights ID
speed – speed level
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-
turn_off
(lights, sync=True, timeout=None)¶ Stop the pattern set by startPattern.
- Parameters
lights – wheel lights ID
sync – True if this command is blocking
timeout – maximum blocking time in second, None means infinity
- Returns
serial number of the command, if command is blocking also return a dict, it include two key, ‘state’ indicate execute result and ‘error’ will contain error code
-