Toys

Sphero 2.0 / SPRK

class spherov2.toy.sphero.Sphero(toy, adapter_cls)[source]

Bases: Toy

toy_type = ToyType(display_name='SPRK/2.0', prefix=None, filter_prefix='Sphero', cmd_safe_interval=0.06)
sensors = {'accelerometer': {'x': ToySensor(bit=32768, min_value=-32768.0, max_value=32767.0, modifier=<function Sphero.<lambda>>), 'y': ToySensor(bit=16384, min_value=-32768.0, max_value=32767.0, modifier=<function Sphero.<lambda>>), 'z': ToySensor(bit=8192, min_value=-32768.0, max_value=32767.0, modifier=<function Sphero.<lambda>>)}, 'attitude': {'pitch': ToySensor(bit=262144, min_value=-179.0, max_value=180.0, modifier=None), 'roll': ToySensor(bit=131072, min_value=-179.0, max_value=180.0, modifier=None), 'yaw': ToySensor(bit=65536, min_value=-179.0, max_value=180.0, modifier=None)}, 'back_emf': {'left': ToySensor(bit=64, min_value=-32768.0, max_value=32767.0, modifier=None), 'right': ToySensor(bit=32, min_value=-32768.0, max_value=32767.0, modifier=None)}, 'gyroscope': {'x': ToySensor(bit=4096, min_value=-20000.0, max_value=20000.0, modifier=<function Sphero.<lambda>>), 'y': ToySensor(bit=2048, min_value=-20000.0, max_value=20000.0, modifier=<function Sphero.<lambda>>), 'z': ToySensor(bit=1024, min_value=-20000.0, max_value=20000.0, modifier=<function Sphero.<lambda>>)}}
extended_sensors = {'accel_one': {'accel_one': ToySensor(bit=33554432, min_value=0.0, max_value=8000.0, modifier=None)}, 'locator': {'x': ToySensor(bit=134217728, min_value=-32768.0, max_value=32767.0, modifier=None), 'y': ToySensor(bit=67108864, min_value=-32768.0, max_value=32767.0, modifier=None)}, 'quaternion': {'w': ToySensor(bit=268435456, min_value=-10000.0, max_value=10000.0, modifier=<function Sphero.<lambda>>), 'x': ToySensor(bit=2147483648, min_value=-10000.0, max_value=10000.0, modifier=<function Sphero.<lambda>>), 'y': ToySensor(bit=1073741824, min_value=-10000.0, max_value=10000.0, modifier=<function Sphero.<lambda>>), 'z': ToySensor(bit=536870912, min_value=-10000.0, max_value=10000.0, modifier=<function Sphero.<lambda>>)}, 'speed': {'speed': ToySensor(bit=4194304, min_value=0.0, max_value=32767.0, modifier=None)}, 'velocity': {'x': ToySensor(bit=16777216, min_value=-32768.0, max_value=32767.0, modifier=<function Sphero.<lambda>>), 'y': ToySensor(bit=8388608, min_value=-32768.0, max_value=32767.0, modifier=<function Sphero.<lambda>>)}}
wake()[source]
add_battery_state_changed_notify_listener(listener: Callable)
remove_battery_state_changed_notify_listener(listener: Callable)
add_collision_detected_notify_listener(listener: Callable)
remove_collision_detected_notify_listener(listener: Callable)
add_did_sleep_notify_listener(listener: Callable)
remove_did_sleep_notify_listener(listener: Callable)
add_gyro_max_notify_listener(listener: Callable)
remove_gyro_max_notify_listener(listener: Callable)
add_sensor_streaming_data_notify_listener(listener: Callable)
remove_sensor_streaming_data_notify_listener(listener: Callable)
add_will_sleep_notify_listener(listener: Callable)
remove_will_sleep_notify_listener(listener: Callable)
begin_reflash(proc=None)
here_is_page(proc=None)
jump_to_main(proc=None)
enable_battery_state_changed_notify(enable: bool, proc=None)
get_bluetooth_info(proc=None)
get_charger_state(proc=None)
get_power_state(proc=None)
get_versions(proc=None)
jump_to_bootloader(proc=None)
ping(proc=None)
set_bluetooth_name(name: bytes, proc=None)
set_inactivity_timeout(timeout: int, proc=None)
sleep(interval_option: IntervalOptions, unk: int, unk2: int, proc=None)
boost(s, s2, proc=None)[source]
configure_collision_detection(collision_detection_method: CollisionDetectionMethods, x_threshold, y_threshold, x_speed, y_speed, dead_time, proc=None)[source]
configure_locator(flags, x, y, yaw_tare, proc=None)[source]
get_chassis_id(proc=None)[source]
get_persistent_options(proc=None)[source]
get_temperature(proc=None)[source]
set_temporary_options(options: Options, proc=None)[source]
roll(speed, heading, roll_mode: RollModes, reverse_flag: ReverseFlags, proc=None)[source]
self_level(opt1: bool, opt2: bool, opt3: bool, opt4: bool, angle_limit, timeout, true_time, proc=None)[source]
set_back_led_brightness(brightness, proc=None)[source]
set_data_streaming(interval, num_samples_per_packet, mask, count, extended_mask, proc=None)[source]
set_heading(heading: int, proc=None)[source]
set_main_led(r, g, b, proc=None)[source]
set_motion_timeout(timeout: int, proc=None)[source]
set_persistent_options(options: Options, proc=None)[source]
set_raw_motors(left_mode: RawMotorModes, left_speed, right_mode: RawMotorModes, right_speed, proc=None)[source]
set_rotation_rate(rate: int, proc=None)[source]
set_stabilization(stabilize: bool, proc=None)[source]
property drive_control
property sensor_control
property stats_control
property firmware_update_control

Ollie

class spherov2.toy.ollie.Ollie(toy, adapter_cls)[source]

Bases: Sphero

toy_type = ToyType(display_name='Ollie', prefix='2B-', filter_prefix='2B', cmd_safe_interval=0.06)
get_sku(proc=None)

BB-8

class spherov2.toy.bb8.BB8(toy, adapter_cls)[source]

Bases: Ollie

toy_type = ToyType(display_name='BB-8', prefix='BB-', filter_prefix='BB', cmd_safe_interval=0.06)
get_factory_config_block_crc(proc=None)

BB-9E

class spherov2.toy.bb9e.BB9E(toy, adapter_cls)[source]

Bases: ToyV2

toy_type = ToyType(display_name='BB-9E', prefix='GB-', filter_prefix='GB', cmd_safe_interval=0.12)
class LEDs(value)[source]

Bases: IntEnum

An enumeration.

BODY_RED = 0
BODY_GREEN = 1
BODY_BLUE = 2
AIMING = 3
HEAD = 4
class Animations(value)[source]

Bases: IntEnum

An enumeration.

EMOTE_ALARM = 0
EMOTE_NO = 1
EMOTE_SCAN_SWEEP = 2
EMOTE_SCARED = 3
EMOTE_YES = 4
EMOTE_AFFIRMATIVE = 5
EMOTE_AGITATED = 6
EMOTE_ANGRY = 7
EMOTE_CONTENT = 8
EMOTE_EXCITED = 9
EMOTE_FIERY = 10
EMOTE_GREETINGS = 11
EMOTE_NERVOUS = 12
EMOTE_SLEEP = 14
EMOTE_SURPRISED = 15
EMOTE_UNDERSTOOD = 16
HIT = 17
WWM_ANGRY = 18
WWM_ANXIOUS = 19
WWM_BOW = 20
WWM_CURIOUS = 22
WWM_DOUBLE_TAKE = 23
WWM_EXCITED = 24
WWM_FIERY = 25
WWM_HAPPY = 26
WWM_JITTERY = 27
WWM_LAUGH = 28
WWM_LONG_SHAKE = 29
WWM_NO = 30
WWM_OMINOUS = 31
WWM_RELIEVED = 32
WWM_SAD = 33
WWM_SCARED = 34
WWM_SHAKE = 35
WWM_SURPRISED = 36
WWM_TAUNTING = 37
WWM_WHISPER = 38
WWM_YELLING = 39
WWM_YOOHOO = 40
WWM_FRUSTRATED = 41
IDLE_1 = 42
IDLE_2 = 43
IDLE_3 = 44
EYE_1 = 45
EYE_2 = 46
EYE_3 = 47
EYE_4 = 48
sensors = {'accel_one': {'accel_one': ToySensor(bit=512, min_value=0.0, max_value=8000.0, modifier=None)}, 'accelerometer': {'x': ToySensor(bit=32768, min_value=-8.19, max_value=8.19, modifier=None), 'y': ToySensor(bit=16384, min_value=-8.19, max_value=8.19, modifier=None), 'z': ToySensor(bit=8192, min_value=-8.19, max_value=8.19, modifier=None)}, 'attitude': {'pitch': ToySensor(bit=262144, min_value=-179.0, max_value=180.0, modifier=None), 'roll': ToySensor(bit=131072, min_value=-179.0, max_value=180.0, modifier=None), 'yaw': ToySensor(bit=65536, min_value=-179.0, max_value=180.0, modifier=None)}, 'core_time': {'core_time': ToySensor(bit=2, min_value=0.0, max_value=0.0, modifier=None)}, 'locator': {'x': ToySensor(bit=64, min_value=-32768.0, max_value=32767.0, modifier=<function BB9E.<lambda>>), 'y': ToySensor(bit=32, min_value=-32768.0, max_value=32767.0, modifier=<function BB9E.<lambda>>)}, 'quaternion': {'w': ToySensor(bit=4194304, min_value=-1.0, max_value=1.0, modifier=None), 'x': ToySensor(bit=33554432, min_value=-1.0, max_value=1.0, modifier=None), 'y': ToySensor(bit=16777216, min_value=-1.0, max_value=1.0, modifier=None), 'z': ToySensor(bit=8388608, min_value=-1.0, max_value=1.0, modifier=None)}, 'speed': {'speed': ToySensor(bit=4, min_value=0.0, max_value=32767.0, modifier=None)}, 'velocity': {'x': ToySensor(bit=16, min_value=-32768.0, max_value=32767.0, modifier=<function BB9E.<lambda>>), 'y': ToySensor(bit=8, min_value=-32768.0, max_value=32767.0, modifier=<function BB9E.<lambda>>)}}
extended_sensors = {'gyroscope': {'x': ToySensor(bit=33554432, min_value=-20000.0, max_value=20000.0, modifier=None), 'y': ToySensor(bit=16777216, min_value=-20000.0, max_value=20000.0, modifier=None), 'z': ToySensor(bit=8388608, min_value=-20000.0, max_value=20000.0, modifier=None)}}
play_animation(animation: IntEnum, proc=None)
stop_animation(proc=None)
enable_idle_animations(enable: bool, proc=None)
enable_trophy_mode(enable: bool, proc=None)
get_trophy_mode_enabled(proc=None)
ping(data, proc=None) bytearray
get_api_protocol_version(proc=None) ApiProtocolVersion
send_command_to_shell(command: bytes, proc=None)
add_send_string_to_console_listener(listener: Callable)
remove_send_string_to_console_listener(listener: Callable)
set_bluetooth_name(name: bytes, proc=None)
get_bluetooth_name(proc=None)
set_raw_motors(left_mode: RawMotorModes, left_speed, right_mode: RawMotorModes, right_speed, proc=None)
reset_yaw(proc=None)
drive_with_heading(speed, heading, drive_flags: DriveFlags, proc=None)
set_stabilization(stabilization_index: StabilizationIndexes, proc=None)
get_factory_mode_challenge(proc=None)
enter_factory_mode(challenge: int, proc=None)
exit_factory_mode(proc=None)
get_chassis_id(proc=None)
get_pending_update_flags(proc=None)
play_audio_file(sound, playback_mode: AudioPlaybackModes, proc=None)
set_all_leds_with_16_bit_mask(mask, values, proc=None)
start_idle_led_animation(proc=None)
set_sensor_streaming_mask(interval, count, sensor_masks, proc=None)
get_sensor_streaming_mask(proc=None)
add_sensor_streaming_data_notify_listener(listener: Callable)
remove_sensor_streaming_data_notify_listener(listener: Callable)
set_extended_sensor_streaming_mask(sensor_masks, proc=None)
get_extended_sensor_streaming_mask(proc=None)
enable_gyro_max_notify(enable, proc=None)
add_gyro_max_notify_listener(listener: Callable)
remove_gyro_max_notify_listener(listener: Callable)
configure_collision_detection(collision_detection_method: CollisionDetectionMethods, x_threshold, y_threshold, x_speed, y_speed, dead_time, proc=None)
add_collision_detected_notify_listener(listener: Callable)
remove_collision_detected_notify_listener(listener: Callable)
reset_locator_x_and_y(proc=None)
set_locator_flags(locator_flags: bool, proc=None)
set_accelerometer_activity_threshold(threshold: float, proc=None)
enable_accelerometer_activity_notify(enable: bool, proc=None)
add_accelerometer_activity_notify_listener(listener: Callable)
remove_accelerometer_activity_notify_listener(listener: Callable)
set_gyro_activity_threshold(threshold: float, proc=None)
enable_gyro_activity_notify(enable: bool, proc=None)
add_gyro_activity_notify_listener(listener: Callable)
remove_gyro_activity_notify_listener(listener: Callable)
enter_deep_sleep(s, proc=None)
sleep(proc=None)
get_battery_voltage(proc=None)
get_battery_state(proc=None)
enable_battery_state_changed_notify(enable: bool, proc=None)
add_battery_state_changed_notify_listener(listener: Callable)
remove_battery_state_changed_notify_listener(listener: Callable)
wake(proc=None)
add_will_sleep_notify_listener(listener: Callable)
remove_will_sleep_notify_listener(listener: Callable)
add_did_sleep_notify_listener(listener: Callable)
remove_did_sleep_notify_listener(listener: Callable)
enable_battery_voltage_state_change_notify(enable: bool, proc=None)
add_battery_voltage_state_change_notify_listener(listener: Callable)
remove_battery_voltage_state_change_notify_listener(listener: Callable)
get_main_app_version(proc=None)
get_bootloader_version(proc=None)
get_board_revision(proc=None)
get_mac_address(proc=None)
get_stats_id(proc=None)
get_secondary_main_app_version(proc=None)
add_secondary_main_app_version_notify_listener(listener: Callable)
remove_secondary_main_app_version_notify_listener(listener: Callable)
get_processor_name(proc=None)
get_secondary_mcu_bootloader_version(proc=None)
add_get_secondary_mcu_bootloader_version_notify_listener(listener: Callable)
remove_get_secondary_mcu_bootloader_version_notify_listener(listener: Callable)
get_three_character_sku(proc=None)
property drive_control
property firmware_update_control
property multi_led_control
property sensor_control
property stats_control

R2-D2

class spherov2.toy.r2d2.R2D2(toy, adapter_cls)[source]

Bases: BB9E

toy_type = ToyType(display_name='R2-D2', prefix='D2-', filter_prefix='D2', cmd_safe_interval=0.12)
class LEDs(value)[source]

Bases: IntEnum

An enumeration.

FRONT_RED = 0
FRONT_GREEN = 1
FRONT_BLUE = 2
LOGIC_DISPLAYS = 3
BACK_RED = 4
BACK_GREEN = 5
BACK_BLUE = 6
HOLO_PROJECTOR = 7
class Audio(value)[source]

Bases: IntEnum

An enumeration.

TEST_1497HZ = 1
TEST_200HZ = 32
TEST_2517HZ = 63
TEST_3581HZ = 94
TEST_431HZ = 125
TEST_6011HZ = 156
TEST_853HZ = 187
BB8_ALARM_1 = 218
BB8_ALARM_10 = 235
BB8_ALARM_11 = 254
BB8_ALARM_12 = 258
BB8_ALARM_2 = 264
BB8_ALARM_3 = 268
BB8_ALARM_4 = 272
BB8_ALARM_6 = 279
BB8_ALARM_7 = 288
BB8_ALARM_8 = 296
BB8_ALARM_9 = 301
BB8_BOOT_UP = 309
BB8_BOOR_UP_2 = 330
BB8_CHATTY_1 = 352
BB8_CHATTY_10 = 356
BB8_CHATTY_11 = 360
BB8_CHATTY_12 = 368
BB8_CHATTY_13 = 375
BB8_CHATTY_14 = 381
BB8_CHATTY_15 = 390
BB8_CHATTY_16 = 397
BB8_CHATTY_17 = 404
BB8_CHATTY_18 = 410
BB8_CHATTY_19 = 417
BB8_CHATTY_2 = 430
BB8_CHATTY_20 = 464
BB8_CHATTY_22 = 471
BB8_CHATTY_23 = 479
BB8_CHATTY_24 = 492
BB8_CHATTY_25 = 518
BB8_CHATTY_26 = 525
BB8_CHATTY_27 = 537
BB8_CHATTY_3 = 544
BB8_CHATTY_4 = 557
BB8_CHATTY_5 = 570
BB8_CHATTY_6 = 577
BB8_CHATTY_7 = 581
BB8_CHATTY_8 = 587
BB8_CHATTY_9 = 599
BB8_DONT_KNOW = 606
BB8_EXCITED_1 = 612
BB8_EXCITED_2 = 622
BB8_EXCITED_3 = 630
BB8_EXCITED_4 = 644
BB8_HEY_1 = 671
BB8_HEY_10 = 682
BB8_HEY_11 = 686
BB8_HEY_12 = 690
BB8_HEY_13 = 700
BB8_HEY_2 = 724
BB8_HEY_3 = 732
BB8_HEY_4 = 734
BB8_HEY_5 = 739
BB8_HEY_6 = 743
BB8_HEY_7 = 747
BB8_HEY_8 = 753
BB8_HEY_9 = 757
BB8_LAUGH_1 = 761
BB8_LAUGH_2 = 764
BB8_NEGATIVE_1 = 787
BB8_NEGATIVE_10 = 792
BB8_NEGATIVE_11 = 802
BB8_NEGATIVE_12 = 813
BB8_NEGATIVE_13 = 825
BB8_NEGATIVE_14 = 831
BB8_NEGATIVE_15 = 836
BB8_NEGATIVE_16 = 859
BB8_NEGATIVE_17 = 867
BB8_NEGATIVE_18 = 874
BB8_NEGATIVE_19 = 888
BB8_NEGATIVE_2 = 896
BB8_NEGATIVE_20 = 902
BB8_NEGATIVE_21 = 916
BB8_NEGATIVE_22 = 927
BB8_NEGATIVE_23 = 935
BB8_NEGATIVE_24 = 946
BB8_NEGATIVE_25 = 953
BB8_NEGATIVE_26 = 963
BB8_NEGATIVE_27 = 969
BB8_NEGATIVE_28 = 983
BB8_NEGATIVE_29 = 988
BB8_NEGATIVE_3 = 998
BB8_NEGATIVE_30 = 1003
BB8_NEGATIVE_4 = 1010
BB8_NEGATIVE_5 = 1020
BB8_NEGATIVE_6 = 1032
BB8_NEGATIVE_7 = 1040
BB8_NEGATIVE_8 = 1052
BB8_NEGATIVE_9 = 1064
BB8_POSITIVE_1 = 1077
BB8_POSITIVE_10 = 1082
BB8_POSITIVE_11 = 1087
BB8_POSITIVE_12 = 1092
BB8_POSITIVE_13 = 1096
BB8_POSITIVE_14 = 1102
BB8_POSITIVE_15 = 1109
BB8_POSITIVE_16 = 1113
BB8_POSITIVE_2 = 1118
BB8_POSITIVE_3 = 1123
BB8_POSITIVE_4 = 1130
BB8_POSITIVE_5 = 1135
BB8_POSITIVE_6 = 1138
BB8_POSITIVE_7 = 1147
BB8_POSITIVE_8 = 1150
BB8_POSITIVE_9 = 1157
BB8_SAD_1 = 1163
BB8_SAD_10 = 1170
BB8_SAD_11 = 1178
BB8_SAD_12 = 1186
BB8_SAD_13 = 1192
BB8_SAD_14 = 1199
BB8_SAD_15 = 1205
BB8_SAD_16 = 1213
BB8_SAD_17 = 1220
BB8_SAD_18 = 1230
BB8_SAD_2 = 1236
BB8_SAD_3 = 1240
BB8_SAD_4 = 1250
BB8_SAD_5 = 1268
BB8_SAD_6 = 1275
BB8_SAD_7 = 1281
BB8_SAD_8 = 1295
BB8_SAD_9 = 1303
BB8_SHORTCUT = 1308
BB8_WOW_1 = 1324
BB9E_ALARM_1 = 1329
BB9E_ALARM_2 = 1347
BB9E_ALARM_3 = 1363
BB9E_ALARM_4 = 1375
BB9E_ALARM_5 = 1384
BB9E_CHATTY_1 = 1394
BB9E_CHATTY_2 = 1408
BB9E_EXCITED_1 = 1432
BB9E_EXCITED_2 = 1442
BB9E_EXCITED_3 = 1463
BB9E_HEY_1 = 1476
BB9E_HEY_2 = 1486
BB9E_NEGATIVE_1 = 1494
BB9E_NEGATIVE_2 = 1505
BB9E_NEGATIVE_3 = 1516
BB9E_NEGATIVE_4 = 1523
BB9E_POSITIVE_1 = 1531
BB9E_POSITIVE_2 = 1549
BB9E_POSITIVE_3 = 1558
BB9E_POSITIVE_4 = 1571
BB9E_POSITIVE_5 = 1583
BB9E_SAD_1 = 1592
BB9E_SAD_2 = 1600
R2_FALL = 1609
R2_HIT_1 = 1623
R2_HIT_10 = 1628
R2_HIT_11 = 1635
R2_HIT_2 = 1642
R2_HIT_3 = 1647
R2_HIT_4 = 1653
R2_HIT_5 = 1659
R2_HIT_6 = 1664
R2_HIT_7 = 1669
R2_HIT_8 = 1676
R2_HIT_9 = 1684
R2_STEP_1 = 1690
R2_STEP_2 = 1693
R2_STEP_3 = 1696
R2_STEP_4 = 1698
R2_STEP_5 = 1700
R2_STEP_6 = 1702
R2_ACCESS_PANELS = 1704
R2_ALARM_1 = 1737
R2_ALARM_10 = 1747
R2_ALARM_12 = 1756
R2_ALARM_13 = 1763
R2_ALARM_14 = 1771
R2_ALARM_15 = 1784
R2_ALARM_16 = 1791
R2_ALARM_2 = 1809
R2_ALARM_3 = 1821
R2_ALARM_4 = 1831
R2_ALARM_5 = 1835
R2_ALARM_6 = 1843
R2_ALARM_7 = 1858
R2_ALARM_8 = 1867
R2_ALARM_9 = 1893
R2_ANNOYED = 1910
R2_BURNOUT = 1915
R2_CHATTY_1 = 1950
R2_CHATTY_10 = 1959
R2_CHATTY_11 = 1966
R2_CHATTY_12 = 1977
R2_CHATTY_13 = 1987
R2_CHATTY_14 = 2002
R2_CHATTY_15 = 2007
R2_CHATTY_16 = 2010
R2_CHATTY_17 = 2019
R2_CHATTY_18 = 2028
R2_CHATTY_19 = 2039
R2_CHATTY_2 = 2061
R2_CHATTY_20 = 2072
R2_CHATTY_21 = 2080
R2_CHATTY_22 = 2085
R2_CHATTY_23 = 2095
R2_CHATTY_24 = 2105
R2_CHATTY_25 = 2121
R2_CHATTY_26 = 2132
R2_CHATTY_27 = 2143
R2_CHATTY_28 = 2157
R2_CHATTY_29 = 2170
R2_CHATTY_3 = 2174
R2_CHATTY_30 = 2184
R2_CHATTY_31 = 2188
R2_CHATTY_32 = 2198
R2_CHATTY_33 = 2202
R2_CHATTY_34 = 2211
R2_CHATTY_35 = 2221
R2_CHATTY_36 = 2232
R2_CHATTY_37 = 2241
R2_CHATTY_38 = 2253
R2_CHATTY_39 = 2264
R2_CHATTY_4 = 2276
R2_CHATTY_40 = 2285
R2_CHATTY_41 = 2292
R2_CHATTY_42 = 2307
R2_CHATTY_43 = 2322
R2_CHATTY_44 = 2332
R2_CHATTY_45 = 2344
R2_CHATTY_46 = 2357
R2_CHATTY_47 = 2368
R2_CHATTY_48 = 2377
R2_CHATTY_49 = 2387
R2_CHATTY_5 = 2399
R2_CHATTY_50 = 2413
R2_CHATTY_51 = 2424
R2_CHATTY_52 = 2439
R2_CHATTY_53 = 2452
R2_CHATTY_54 = 2457
R2_CHATTY_55 = 2463
R2_CHATTY_56 = 2474
R2_CHATTY_57 = 2492
R2_CHATTY_58 = 2509
R2_CHATTY_59 = 2519
R2_CHATTY_6 = 2524
R2_CHATTY_60 = 2535
R2_CHATTY_61 = 2543
R2_CHATTY_62 = 2554
R2_CHATTY_7 = 2562
R2_CHATTY_8 = 2572
R2_CHATTY_9 = 2579
R2_ENGAGE_HYPER_DRIVE = 2586
R2_EXCITED_1 = 2600
R2_EXCITED_10 = 2615
R2_EXCITED_11 = 2633
R2_EXCITED_12 = 2644
R2_EXCITED_13 = 2654
R2_EXCITED_14 = 2662
R2_EXCITED_15 = 2680
R2_EXCITED_16 = 2691
R2_EXCITED_2 = 2708
R2_EXCITED_3 = 2726
R2_EXCITED_4 = 2730
R2_EXCITED_5 = 2736
R2_EXCITED_6 = 2753
R2_EXCITED_7 = 2767
R2_EXCITED_8 = 2777
R2_EXCITED_9 = 2787
R2_HEAD_SPIN = 2797
R2_HEY_1 = 2813
R2_HEY_10 = 2824
R2_HEY_11 = 2828
R2_HEY_12 = 2833
R2_HEY_2 = 2841
R2_HEY_3 = 2856
R2_HEY_4 = 2861
R2_HEY_5 = 2882
R2_HEY_6 = 2893
R2_HEY_7 = 2898
R2_HEY_8 = 2904
R2_HEY_9 = 2912
R2_LAUGH_1 = 2919
R2_LAUGH_2 = 2935
R2_LAUGH_3 = 2950
R2_LAUGH_4 = 2955
R2_MOTOR = 2970
R2_NEGATIVE_1 = 3101
R2_NEGATIVE_10 = 3111
R2_NEGATIVE_11 = 3115
R2_NEGATIVE_12 = 3121
R2_NEGATIVE_13 = 3132
R2_NEGATIVE_14 = 3136
R2_NEGATIVE_15 = 3148
R2_NEGATIVE_16 = 3152
R2_NEGATIVE_17 = 3157
R2_NEGATIVE_18 = 3164
R2_NEGATIVE_19 = 3167
R2_NEGATIVE_2 = 3172
R2_NEGATIVE_20 = 3178
R2_NEGATIVE_21 = 3191
R2_NEGATIVE_22 = 3200
R2_NEGATIVE_23 = 3213
R2_NEGATIVE_24 = 3219
R2_NEGATIVE_25 = 3226
R2_NEGATIVE_26 = 3230
R2_NEGATIVE_27 = 3233
R2_NEGATIVE_28 = 3241
R2_NEGATIVE_3 = 3251
R2_NEGATIVE_4 = 3258
R2_NEGATIVE_5 = 3263
R2_NEGATIVE_6 = 3268
R2_NEGATIVE_7 = 3274
R2_NEGATIVE_8 = 3282
R2_NEGATIVE_9 = 3291
R2_POSITIVE_1 = 3302
R2_POSITIVE_10 = 3309
R2_POSITIVE_11 = 3318
R2_POSITIVE_12 = 3326
R2_POSITIVE_13 = 3340
R2_POSITIVE_14 = 3353
R2_POSITIVE_15 = 3358
R2_POSITIVE_16 = 3364
R2_POSITIVE_17 = 3369
R2_POSITIVE_18 = 3375
R2_POSITIVE_19 = 3388
R2_POSITIVE_2 = 3394
R2_POSITIVE_20 = 3403
R2_POSITIVE_21 = 3410
R2_POSITIVE_22 = 3422
R2_POSITIVE_23 = 3434
R2_POSITIVE_3 = 3439
R2_POSITIVE_4 = 3446
R2_POSITIVE_5 = 3449
R2_POSITIVE_6 = 3454
R2_POSITIVE_7 = 3460
R2_POSITIVE_8 = 3471
R2_POSITIVE_9 = 3478
R2_SAD_1 = 3484
R2_SAD_10 = 3495
R2_SAD_11 = 3518
R2_SAD_12 = 3526
R2_SAD_13 = 3536
R2_SAD_14 = 3543
R2_SAD_15 = 3553
R2_SAD_16 = 3561
R2_SAD_17 = 3570
R2_SAD_18 = 3593
R2_SAD_19 = 3600
R2_SAD_2 = 3608
R2_SAD_20 = 3612
R2_SAD_21 = 3619
R2_SAD_22 = 3632
R2_SAD_23 = 3639
R2_SAD_24 = 3649
R2_SAD_25 = 3661
R2_SAD_3 = 3686
R2_SAD_4 = 3693
R2_SAD_5 = 3703
R2_SAD_6 = 3739
R2_SAD_7 = 3755
R2_SAD_8 = 3782
R2_SAD_9 = 3790
R2_SCREAM = 3797
R2_SCREAM_2 = 3810
R2_SHORT_OUT = 3825
R2Q5_ALARM_1 = 3864
R2Q5_ALARM_2 = 3869
R2Q5_CHATTY_1 = 3875
R2Q5_CHATTY_2 = 3891
R2Q5_HEY_1 = 3896
R2Q5_HEY_2 = 3901
R2Q5_NEGATIVE_1 = 3907
R2Q5_POSITIVE_1 = 3914
R2Q5_POSITIVE_2 = 3920
R2Q5_SAD_1 = 3925
R2Q5_SHUTDOWN = 3929
BB9E_EXTRA_1 = 3941
BB9E_EXTRA_2 = 4021
BB9E_EXTRA_3 = 4246
BB9E_EXTRA_4 = 4568
BB9E_EXTRA_5 = 4929
BB9E_EXTRA_6 = 5156
BB9E_EXTRA_7 = 5315
BB9E_HEAD_TURN_1 = 5441
BB9E_HEAD_TURN_2 = 5483
BB9E_HEAD_TURN_3 = 5513
class Animations(value)[source]

Bases: IntEnum

An enumeration.

CHARGER_1 = 0
CHARGER_2 = 1
CHARGER_3 = 2
CHARGER_4 = 3
CHARGER_5 = 4
CHARGER_6 = 5
CHARGER_7 = 6
EMOTE_ALARM = 7
EMOTE_ANGRY = 8
EMOTE_ATTENTION = 9
EMOTE_FRUSTRATED = 10
EMOTE_DRIVE = 11
EMOTE_EXCITED = 12
EMOTE_SHORT_CIRCUIT = 14
EMOTE_LAUGH = 15
EMOTE_NO = 16
EMOTE_RETREAT = 17
EMOTE_FIERY = 18
EMOTE_UNDERSTOOD = 19
EMOTE_YES = 21
EMOTE_SCAN = 22
EMOTE_SURPRISED = 24
IDLE_1 = 25
IDLE_2 = 26
IDLE_3 = 27
WWM_ANGRY = 31
WWM_ANXIOUS = 32
WWM_BOW = 33
WWM_CONCERN = 34
WWM_CURIOUS = 35
WWM_DOUBLE_TAKE = 36
WWM_EXCITED = 37
WWM_FIERY = 38
WMM_FRUSTRATED = 39
WWM_HAPPY = 40
WWM_JITTERY = 41
WWM_LAUGH = 42
WWM_LONG_SHAKE = 43
WWM_NO = 44
WWM_OMINOUS = 45
WWM_RELIEVED = 46
WWM_SAD = 47
WWM_SCARED = 48
WWM_SHAKE = 49
WWM_SURPRISED = 50
WWM_TAUNTING = 51
WWM_WHISPER = 52
WWM_YELLING = 53
WWM_YOOHOO = 54
MOTOR = 55
extended_sensors = {'gyroscope': {'x': ToySensor(bit=33554432, min_value=-20000.0, max_value=20000.0, modifier=None), 'y': ToySensor(bit=16777216, min_value=-20000.0, max_value=20000.0, modifier=None), 'z': ToySensor(bit=8388608, min_value=-20000.0, max_value=20000.0, modifier=None)}, 'r2_head_angle': {'r2_head_angle': ToySensor(bit=67108864, min_value=-162.0, max_value=182.0, modifier=None)}}
get_battery_voltage_state(proc=None)
generic_raw_motor(index: GenericRawMotorIndexes, mode: GenericRawMotorModes, speed, proc=None)
perform_leg_action(leg_action: R2LegActions, proc=None)
set_head_position(head_position: float, proc=None)
get_head_position(proc=None)
set_leg_position(leg_position: float, proc=None)
get_leg_position(proc=None)
get_leg_action(proc=None)
enable_leg_action_notify(enable: bool, proc=None)
enable_head_reset_to_zero_notify(enable: bool, proc=None)
add_head_reset_to_zero_notify_listener(listener: Callable)
remove_head_reset_to_zero_notify_listener(listener: Callable)
set_audio_volume(volume, proc=None)
get_audio_volume(proc=None)
stop_all_audio(proc=None)

R2-Q5

class spherov2.toy.r2q5.R2Q5(toy, adapter_cls)[source]

Bases: R2D2

toy_type = ToyType(display_name='R2-Q5', prefix='Q5-', filter_prefix='Q5', cmd_safe_interval=0.12)
class Animations(value)[source]

Bases: IntEnum

An enumeration.

CHARGER_1 = 0
CHARGER_2 = 1
CHARGER_3 = 2
CHARGER_4 = 3
CHARGER_5 = 4
CHARGER_6 = 5
CHARGER_7 = 6
EMOTE_ALARM = 7
EMOTE_ANGRY = 8
EMOTE_ATTENTION = 9
EMOTE_FRUSTRATED = 10
EMOTE_DRIVE = 11
EMOTE_EXCITED = 12
EMOTE_SHORT_CIRCUIT = 14
EMOTE_LAUGH = 15
EMOTE_NO = 16
EMOTE_RETREAT = 17
EMOTE_FIERY = 18
EMOTE_UNDERSTOOD = 19
EMOTE_YES = 21
EMOTE_SCAN = 22
EMOTE_SURPRISED = 24
IDLE_1 = 25
IDLE_2 = 26
IDLE_3 = 27
WWM_ANGRY = 31
WWM_ANXIOUS = 32
WWM_BOW = 33
WWM_CONCERN = 34
WWM_CURIOUS = 35
WWM_DOUBLE_TAKE = 36
WWM_EXCITED = 37
WWM_FIERY = 38
WMM_FRUSTRATED = 39
WWM_HAPPY = 40
WWM_JITTERY = 41
WWM_LAUGH = 42
WWM_LONG_SHAKE = 43
WWM_NO = 44
WWM_OMINOUS = 45
WWM_RELIEVED = 46
WWM_SAD = 47
WWM_SCARED = 48
WWM_SHAKE = 49
WWM_SURPRISED = 50
WWM_TAUNTING = 51
WWM_WHISPER = 52
WWM_YELLING = 53
WWM_YOOHOO = 54

RVR

class spherov2.toy.rvr.RVR(toy, adapter_cls)[source]

Bases: ToyV2

toy_type = ToyType(display_name='Sphero RVR', prefix='RV-', filter_prefix='RV', cmd_safe_interval=0.075)
class LEDs(value)[source]

Bases: IntEnum

An enumeration.

RIGHT_HEADLIGHT_RED = 0
RIGHT_HEADLIGHT_GREEN = 1
RIGHT_HEADLIGHT_BLUE = 2
LEFT_HEADLIGHT_RED = 3
LEFT_HEADLIGHT_GREEN = 4
LEFT_HEADLIGHT_BLUE = 5
LEFT_STATUS_INDICATION_RED = 6
LEFT_STATUS_INDICATION_GREEN = 7
LEFT_STATUS_INDICATION_BLUE = 8
RIGHT_STATUS_INDICATION_RED = 9
RIGHT_STATUS_INDICATION_GREEN = 10
RIGHT_STATUS_INDICATION_BLUE = 11
BATTERY_DOOR_REAR_RED = 12
BATTERY_DOOR_REAR_GREEN = 13
BATTERY_DOOR_REAR_BLUE = 14
BATTERY_DOOR_FRONT_RED = 15
BATTERY_DOOR_FRONT_GREEN = 16
BATTERY_DOOR_FRONT_BLUE = 17
POWER_BUTTON_FRONT_RED = 18
POWER_BUTTON_FRONT_GREEN = 19
POWER_BUTTON_FRONT_BLUE = 20
POWER_BUTTON_REAR_RED = 21
POWER_BUTTON_REAR_GREEN = 22
POWER_BUTTON_REAR_BLUE = 23
LEFT_BRAKELIGHT_RED = 24
LEFT_BRAKELIGHT_GREEN = 25
LEFT_BRAKELIGHT_BLUE = 26
RIGHT_BRAKELIGHT_RED = 27
RIGHT_BRAKELIGHT_GREEN = 28
RIGHT_BRAKELIGHT_BLUE = 29
UNDERCARRIAGE_WHITE = 30
ping(data, proc=None) bytearray
get_api_protocol_version(proc=None) ApiProtocolVersion
send_command_to_shell(command: bytes, proc=None)
add_send_string_to_console_listener(listener: Callable)
remove_send_string_to_console_listener(listener: Callable)
get_supported_dids(proc=None)
get_supported_cids(s, proc=None)
get_main_app_version(proc=None)
get_bootloader_version(proc=None)
get_board_revision(*, proc=Processors.PRIMARY)
get_mac_address(*, proc=Processors.PRIMARY)
get_stats_id(*, proc=Processors.PRIMARY)
get_processor_name(proc=None)
get_boot_reason(*, proc=Processors.PRIMARY)
get_last_error_info(*, proc=Processors.PRIMARY)
write_config_block(*, proc=Processors.PRIMARY)
get_config_block(*, proc=Processors.PRIMARY)
set_config_block(metadata_version, config_block_version, application_data, *, proc=Processors.PRIMARY)
erase_config_block(j, *, proc=Processors.PRIMARY)
get_swd_locking_status(proc=None)
get_manufacturing_date(*, proc=Processors.PRIMARY)
get_sku(*, proc=Processors.PRIMARY)
get_core_up_time_in_milliseconds(*, proc=Processors.PRIMARY)
get_event_log_status(proc=None)
get_event_log_data(j, j2, proc=None)
clear_event_log(proc=None)
enable_sos_message_notify(enable: bool, *, proc=Processors.PRIMARY)
add_sos_message_notify_listener(listener: Callable)
remove_sos_message_notify_listener(listener: Callable)
get_sos_message(*, proc=Processors.PRIMARY)
clear_sos_message(*, proc=Processors.PRIMARY)
get_out_of_box_state(*, proc=Processors.PRIMARY)
enable_out_of_box_state(enable: bool, *, proc=Processors.PRIMARY)
enter_deep_sleep(s, *, proc=Processors.PRIMARY)
sleep(*, proc=Processors.PRIMARY)
force_battery_refresh(*, proc=Processors.PRIMARY)
wake(*, proc=Processors.PRIMARY)
get_battery_percentage(*, proc=Processors.PRIMARY)
get_battery_voltage_state(*, proc=Processors.PRIMARY)
add_will_sleep_notify_listener(listener: Callable)
remove_will_sleep_notify_listener(listener: Callable)
add_did_sleep_notify_listener(listener: Callable)
remove_did_sleep_notify_listener(listener: Callable)
enable_battery_voltage_state_change_notify(enable: bool, *, proc=Processors.PRIMARY)
add_battery_voltage_state_change_notify_listener(listener: Callable)
remove_battery_voltage_state_change_notify_listener(listener: Callable)
get_battery_voltage_in_volts(reading_type: BatteryVoltageReadingTypes, *, proc=Processors.PRIMARY)
get_battery_voltage_state_thresholds(*, proc=Processors.PRIMARY)
get_current_sense_amplifier_current(amplifier_id: AmplifierIds, *, proc=Processors.PRIMARY)
get_efuse_fault_status(efuse_id: EfuseIds, *, proc=Processors.PRIMARY)
add_efuse_fault_occurred_notify_listener(listener: Callable)
remove_efuse_fault_occurred_notify_listener(listener: Callable)
enable_efuse(efuse_id: EfuseIds, *, proc=Processors.PRIMARY)
set_raw_motors(left_mode: RawMotorModes, left_speed, right_mode: RawMotorModes, right_speed, *, proc=Processors.SECONDARY)
reset_yaw(*, proc=Processors.SECONDARY)
drive_with_heading(speed, heading, drive_flags: DriveFlags, *, proc=Processors.SECONDARY)
set_control_system_type(s, s2, *, proc=Processors.SECONDARY)
set_component_parameters(s, s2, f_arr, *, proc=Processors.SECONDARY)
get_component_parameters(s, s2, *, proc=Processors.SECONDARY)
set_custom_control_system_timeout(timeout, *, proc=Processors.SECONDARY)
enable_motor_stall_notify(enable, *, proc=Processors.SECONDARY)
add_motor_stall_notify_listener(listener: Callable)
remove_motor_stall_notify_listener(listener: Callable)
enable_motor_fault_notify(enable, *, proc=Processors.SECONDARY)
add_motor_fault_notify_listener(listener: Callable)
remove_motor_fault_notify_listener(listener: Callable)
get_motor_fault_state(*, proc=Processors.SECONDARY)
enable_gyro_max_notify(enable, *, proc=Processors.SECONDARY)
add_gyro_max_notify_listener(listener: Callable)
remove_gyro_max_notify_listener(listener: Callable)
reset_locator_x_and_y(*, proc=Processors.SECONDARY)
set_locator_flags(locator_flags: bool, *, proc=Processors.SECONDARY)
get_bot_to_bot_infrared_readings(*, proc=Processors.SECONDARY)
get_rgbc_sensor_values(*, proc=Processors.PRIMARY)
magnetometer_calibrate_to_north(*, proc=Processors.SECONDARY)
add_magnetometer_north_yaw_notify_listener(listener: Callable)
remove_magnetometer_north_yaw_notify_listener(listener: Callable)
start_robot_to_robot_infrared_broadcasting(far_code, near_code, *, proc=Processors.SECONDARY)
start_robot_to_robot_infrared_following(far_code, near_code, *, proc=Processors.SECONDARY)
stop_robot_to_robot_infrared_broadcasting(*, proc=Processors.SECONDARY)
add_robot_to_robot_infrared_message_received_notify_listener(listener: Callable)
remove_robot_to_robot_infrared_message_received_notify_listener(listener: Callable)
get_ambient_light_sensor_value(*, proc=Processors.PRIMARY)
stop_robot_to_robot_infrared_following(*, proc=Processors.SECONDARY)
start_robot_to_robot_infrared_evading(far_code, near_code, *, proc=Processors.SECONDARY)
stop_robot_to_robot_infrared_evading(*, proc=Processors.SECONDARY)
enable_color_detection_notify(enable, interval, minimum_confidence_threshold, *, proc=Processors.PRIMARY)
add_color_detection_notify_listener(listener: Callable)
remove_color_detection_notify_listener(listener: Callable)
get_current_detected_color_reading(*, proc=Processors.PRIMARY)
enable_color_detection(enable, *, proc=Processors.PRIMARY)
configure_streaming_service(token, configuration, proc=None)
start_streaming_service(period, proc=None)
stop_streaming_service(proc=None)
clear_streaming_service(proc=None)
add_streaming_service_data_notify_listener(listener: Callable)
remove_streaming_service_data_notify_listener(listener: Callable)
enable_robot_infrared_message_notify(enable, *, proc=Processors.SECONDARY)
send_infrared_message(infrared_code, front_strength, left_strength, right_strength, rear_strength, *, proc=Processors.SECONDARY)
add_motor_current_notify_listener(listener: Callable)
remove_motor_current_notify_listener(listener: Callable)
enable_motor_current_notify(enable, *, proc=Processors.SECONDARY)
get_motor_temperature(motor_index, *, proc=Processors.SECONDARY)
configure_sensitivity_based_collision_detection(method: SensitivityBasedCollisionDetectionMethods, level: SensitivityLevels, i, *, proc=Processors.SECONDARY)
enable_sensitivity_based_collision_detection_notify(enable, *, proc=Processors.SECONDARY)
add_sensitivity_based_collision_detected_notify_listener(listener: Callable)
remove_sensitivity_based_collision_detected_notify_listener(listener: Callable)
get_motor_thermal_protection_status(*, proc=Processors.SECONDARY)
enable_motor_thermal_protection_status_notify(enable, *, proc=Processors.SECONDARY)
add_motor_thermal_protection_status_notify_listener(listener: Callable)
remove_motor_thermal_protection_status_notify_listener(listener: Callable)
set_bluetooth_name(name: bytes, *, proc=Processors.PRIMARY)
get_bluetooth_name(*, proc=Processors.PRIMARY)
get_bluetooth_advertising_name(*, proc=Processors.PRIMARY)
set_all_leds_with_32_bit_mask(mask, values, *, proc=Processors.PRIMARY)
set_compressed_frame_player_one_color(r, g, b, *, proc=Processors.PRIMARY)
save_compressed_frame_player_animation(s, s2, z, s3, s_arr, i, i_arr, *, proc=Processors.PRIMARY)
play_compressed_frame_player_animation(s, *, proc=Processors.PRIMARY)
play_compressed_frame_player_frame(i, *, proc=Processors.PRIMARY)
get_compressed_frame_player_list_of_frames(*, proc=Processors.PRIMARY)
delete_all_compressed_frame_player_animations_and_frames(*, proc=Processors.PRIMARY)
pause_compressed_frame_player_animation(*, proc=Processors.PRIMARY)
resume_compressed_frame_player_animation(*, proc=Processors.PRIMARY)
reset_compressed_frame_player_animation(*, proc=Processors.PRIMARY)
add_compressed_frame_player_animation_complete_notify_listener(listener: Callable)
remove_compressed_frame_player_animation_complete_notify_listener(listener: Callable)
assign_compressed_frame_player_frames_to_animation(s, i, i_arr, *, proc=Processors.PRIMARY)
save_compressed_frame_player_animation_without_frames(s, s2, z, s3, s_arr, i, *, proc=Processors.PRIMARY)
play_compressed_frame_player_animation_with_loop_option(s, z, *, proc=Processors.PRIMARY)
get_active_color_palette(*, proc=Processors.PRIMARY)
set_active_color_palette(rgb_index_bytes, *, proc=Processors.PRIMARY)
get_color_identification_report(red, green, blue, confidence_threshold, *, proc=Processors.PRIMARY)
load_color_palette(palette_index, *, proc=Processors.PRIMARY)
save_color_palette(palette_index, *, proc=Processors.PRIMARY)
get_compressed_frame_player_frame_info_type(*, proc=Processors.PRIMARY)
save_compressed_frame_player16_bit_frame(i, i2, i3, i4, i5, *, proc=Processors.PRIMARY)
release_led_requests(*, proc=Processors.PRIMARY)
get_current_application_id(proc=None)
get_all_updatable_processors(*, proc=Processors.PRIMARY)
get_version_for_updatable_processors(*, proc=Processors.PRIMARY)
set_pending_update_for_processors(data, *, proc=Processors.PRIMARY)
get_pending_update_for_processors(*, proc=Processors.PRIMARY)
reset_with_parameters(strategy, *, proc=Processors.PRIMARY)
clear_pending_update_processors(data, *, proc=Processors.PRIMARY)
get_factory_mode_challenge(proc=None)
enter_factory_mode(challenge: int, proc=None)
exit_factory_mode(proc=None)
get_chassis_id(proc=None)
enable_extended_life_test(enable, *, proc=Processors.PRIMARY)
get_factory_mode_status(proc=None)
property drive_control
property multi_led_control
property sensor_control