toio.simple package¶
Submodules¶
- toio.simple.async_simple module
Direction
AsyncSimpleCube
AsyncSimpleCube.DEFAULT_ROTATION_OPTION
AsyncSimpleCube.DEFAULT_MOVEMENT_TYPE
AsyncSimpleCube.DEFAULT_TIMEOUT
AsyncSimpleCube.DEFAULT_ONE_STEP
AsyncSimpleCube.CELL_SIZE
AsyncSimpleCube.MONITORING_CYCLE
AsyncSimpleCube.ensure_event_loop()
AsyncSimpleCube.search()
AsyncSimpleCube.__init__()
AsyncSimpleCube.connect()
AsyncSimpleCube.disconnect()
AsyncSimpleCube.sleep()
AsyncSimpleCube.move()
AsyncSimpleCube.spin()
AsyncSimpleCube.run_motor()
AsyncSimpleCube.stop_motor()
AsyncSimpleCube.move_steps()
AsyncSimpleCube.turn()
AsyncSimpleCube.move_to()
AsyncSimpleCube.set_orientation()
AsyncSimpleCube.move_to_the_grid_cell()
AsyncSimpleCube.get_current_position()
AsyncSimpleCube.get_x()
AsyncSimpleCube.get_y()
AsyncSimpleCube.get_orientation()
AsyncSimpleCube.get_grid()
AsyncSimpleCube.get_grid_x()
AsyncSimpleCube.get_grid_y()
AsyncSimpleCube.is_on_the_gird_cell()
AsyncSimpleCube.is_touched()
AsyncSimpleCube.get_touched_card()
AsyncSimpleCube.get_cube_name()
AsyncSimpleCube.get_battery_level()
AsyncSimpleCube.get_3d_angle()
AsyncSimpleCube.get_posture()
AsyncSimpleCube.is_button_pressed()
AsyncSimpleCube.turn_on_cube_lamp()
AsyncSimpleCube.turn_off_cube_lamp()
AsyncSimpleCube.play_sound()
AsyncSimpleCube.stop_sound()
AsyncSimpleCube.is_magnet_in_contact()
Module contents¶
- class toio.simple.SimpleCube(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)[source]¶
Bases:
object
Access to toio core cube by easier method Functions that like blocks in visual programming
- __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) None [source]¶
- run_motor(left_speed: int, right_speed: int, duration: float, wait_to_complete: bool = True) None [source]¶
- is_touched(item: StandardIdCard) bool [source]¶
- class toio.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]¶
- class toio.simple.SimpleCube_v1_0(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, dbg_name: str = '')[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, dbg_name: str = '') None [source]¶
- spin(speed: int, duration: float, wait_to_complete: bool = True) None [source]¶
speed: (negative value: anticlockwise)
- run_motor(left_speed: int, right_speed: int, duration: float, wait_to_complete: bool = True) None [source]¶
- is_touched(item: StandardIdCard) bool [source]¶