|
VEX EDR Python API
|
Config Ultrasonic distance sensor. More...
Public Member Functions | |
| def | __init__ (self, digitalnum, unit=UNIT_CM) |
| def | distance (self) |
| Get the distance indicated by the sensor. More... | |
| 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... | |
Config Ultrasonic distance sensor.
Occupies two ports. Connect the INPUT cable the specified port, and the OUTPUT cable to the next port.
| digitalnum | first of the two consecutive digital ports the sensor is connected to (1-11). |
| unit | Unit type: UNIT_CM, UNIT_MM or UNIT_INCH. Default UNIT_CM. |
| def vex.UltrasonicSensor.__init__ | ( | self, | |
| digitalnum, | |||
unit = UNIT_CM |
|||
| ) |
| def vex.UltrasonicSensor.distance | ( | self | ) |
Get the distance indicated by the sensor.
| def vex.UltrasonicSensor.set_unit_inch | ( | self | ) |
Set the distance unit to inches.
| def vex.UltrasonicSensor.set_unit_cm | ( | self | ) |
Set the distance unit to centimeters.
| def vex.UltrasonicSensor.set_unit_mm | ( | self | ) |
Set the distance unit to millimeters.
1.8.15