src package
Subpackages
Submodules
src.camera module
src.distance_sensor module
- class src.distance_sensor.Config[source]
Bases:
TypedDict
- pins: PinsConfig
src.led module
src.motor module
- class src.motor.Config[source]
Bases:
TypedDict
- pins: PinsConfig
src.params module
src.switch module
src.vehicle module
- class src.vehicle.Config[source]
Bases:
TypedDict
- motors: MotorsConfig
- slant: float
- class src.vehicle.Vehicle(config: Config)[source]
Bases:
object
- static calculate_slant_from_ticks(left_motor_ticks: int, right_motor_ticks: int) float [source]
Calculate the slant of the vehicle based on the difference in ticks between the left and right motors
- current_speed: float
- mode: str | None
- pivot_left(speed: float = 1.0) None [source]
at the same speed, drive the left motor backward, and the right motor forward
- pivot_right(speed: float = 1.0) None [source]
at the same speed, drive the left motor forward, and the right motor backward
- slant: float