VEX IQ Python API
|
Config Ultrasonic distance sensor. More...
Public Member Functions | |
def | __init__ (self, port=None, unit=UNIT_CM) |
def | set_unit_inch (self) |
Set the distance unit to inches. More... | |
def | set_unit_cm (self) |
Set the distance unit to centimeters. More... | |
def | set_unit_mm (self) |
Set the distance unit to millimeters. More... | |
def | distance (self) |
Get the distance indicated by the sensor. More... | |
Config Ultrasonic distance sensor.
port | 1-12, None to autodetect. Default None. |
unit | Unit type: UNIT_CM, UNIT_MM or UNIT_INCH. Default UNIT_CM. For backwards compatibility, True is UNIT_INCH and False UNIT_CM. |
def vexiq.DistanceSensor.__init__ | ( | self, | |
port = None , |
|||
unit = UNIT_CM |
|||
) |
def vexiq.DistanceSensor.set_unit_inch | ( | self | ) |
Set the distance unit to inches.
def vexiq.DistanceSensor.set_unit_cm | ( | self | ) |
Set the distance unit to centimeters.
def vexiq.DistanceSensor.set_unit_mm | ( | self | ) |
Set the distance unit to millimeters.
def vexiq.DistanceSensor.distance | ( | self | ) |
Get the distance indicated by the sensor.