toio.simple.async_simple module¶
- class toio.simple.async_simple.Direction(*values)[source]¶
Bases:
Enum- Forward = 1¶
- Backward = 2¶
- Right = 3¶
- Left = 4¶
- class toio.simple.async_simple.AsyncSimpleCube(name: str | None = None, timeout: int = 5, coordinate_system_class: ~typing.Type[~toio.coordinate_systems.ToioRelativeCoordinateSystem | ~toio.coordinate_systems.VisualProgrammingCoordinateSystem] = <class 'toio.coordinate_systems.VisualProgrammingCoordinateSystem'>, log_level: int = 0, cube: ~toio.cube.ToioCoreCube | None = None)[source]¶
Bases:
objectAccess to toio core cube by easier method Functions that like blocks in visual programming
- DEFAULT_ROTATION_OPTION: ClassVar[RotationOption] = 0¶
- DEFAULT_MOVEMENT_TYPE: ClassVar[MovementType] = 0¶
- DEFAULT_TIMEOUT: ClassVar[int] = 10¶
- DEFAULT_ONE_STEP: ClassVar[int] = 1¶
- CELL_SIZE: ClassVar[float] = 43.43¶
- MONITORING_CYCLE: ClassVar[float] = 0.01¶
- __init__(name: str | None = None, timeout: int = 5, coordinate_system_class: ~typing.Type[~toio.coordinate_systems.ToioRelativeCoordinateSystem | ~toio.coordinate_systems.VisualProgrammingCoordinateSystem] = <class 'toio.coordinate_systems.VisualProgrammingCoordinateSystem'>, log_level: int = 0, cube: ~toio.cube.ToioCoreCube | None = None) None[source]¶
- async spin(speed: int, duration: float, wait_to_complete: bool = True) None[source]¶
speed: (negative value: anticlockwise)
- async run_motor(left_speed: int, right_speed: int, duration: float, wait_to_complete: bool = True) None[source]¶
- async is_touched(item: StandardIdCard) bool[source]¶
- async turn_on_smooth_flashing(r: int, g: int, b: int, repeat: int, cycle: float) None[source]¶
turn_on_smooth_flashing.
- Parameters:
r (int) – Red (0-255)
g (int) – Green (0-255)
b (int) – Blue (0-255)
repeat (int) – Number of repetitions (0: infinite)
cycle (float) – Cycle of flashing [s]
- Return type:
None
- async request_remote_power_off(time_s: int) None[source]¶
request_remote_power_off.
- Parameters:
time_s (int) – Time until power off [s]
- Return type:
None
- async set_speaker_mute(mute: SpeakerMute) None[source]¶
set_speaker_mute.
- Parameters:
mute (SpeakerMute) – Mute setting
- Return type:
None