|
Smartcar Shield
|
#include <InfraredAnalogSensor.hpp>


Public Member Functions | |
| InfraredAnalogSensor (Runtime &runtime) | |
| unsigned int | getMedianDistance (uint8_t iterations=smartcarlib::constants::analogInfraredSensor::kDefaultIterations) override |
| Gets the median distance from the specified number of measurements. More... | |
Public Member Functions inherited from DistanceSensor | |
| virtual | ~DistanceSensor ()=default |
| virtual unsigned int | getDistance ()=0 |
| Gets the distance measured by the sensor in centimeters. More... | |
An abstract class to represent the various infrared analog sensors. These sensors are able to conduct measurements by emiting an analog signal that can be read by a microcontroller through the ADC.
Definition at line 25 of file InfraredAnalogSensor.hpp.
| InfraredAnalogSensor::InfraredAnalogSensor | ( | Runtime & | runtime | ) |
Definition at line 12 of file InfraredAnalogSensor.cpp.
|
overridevirtual |
Gets the median distance from the specified number of measurements.
| iterations | Number of measurements to conduct (at most kMaxMedianMeasurements) |
0 or larger than kMaxMedianMeasurementsExample:
Implements DistanceSensor.
Definition at line 17 of file InfraredAnalogSensor.cpp.

1.8.17