toio.simple.async_simple module¶
- class toio.simple.async_simple.Direction(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[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:
object
Access 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]¶