38 return ev3_ultrasonic_sensor_get_distance(m_port);
47 return ev3_ultrasonic_sensor_get_raw_data(m_port, US_DIST_METRIC);
56 return ev3_ultrasonic_sensor_get_raw_data(m_port, US_DIST_IMPERIAL) / 10;
65 return (ev3_ultrasonic_sensor_get_raw_data(m_port, US_DIST_IMPERIAL) * 12) / 10;
75 return ev3_ultrasonic_sensor_listen(m_port);
bool_t listen()
Listen and return true if catch ultrasonic signal.
Class Sensor. API for working with sensor.
int millimeters()
Get millimeters in centimeters.
int inches()
Get measure distance in inches.
Class UltrasonicSensor. API for working with ultrasonic sensor.
int inchesLine()
Get measure distance in line (1/12 inch).
UltrasonicSensor(SensorPort port)
Constructor of class UltrasonicSensor.
EV3RT CPP API for sensor.
SensorPort
Enum with index of sensor port.
int centimeters()
Get distance in centimeters.