27 #ifndef _EASYUINO_DISTANCE_METER_ACCURATE_h 28 #define _EASYUINO_DISTANCE_METER_ACCURATE_h 30 #include "Utilities.h" 31 #include "DistanceMeterNonBlock.h" 36 enum TemperatureScale : uint8_t {
37 CELSIUS, KELVIN, FAHRENHEIT
54 float _airTemperature;
56 TemperatureScale _temperatureScale;
79 void updateDistance(IN
float airTemperature = DEFAULT_AIR_TEMPERATURE_CELSIUS, IN TemperatureScale temperatureScale = CELSIUS);
88 void updateDistanceNonBlock(IN
float airTemperature = DEFAULT_AIR_TEMPERATURE_CELSIUS, IN TemperatureScale temperatureScale = CELSIUS);
96 static float CalculateSoundSpeed(IN
float airTemperature = DEFAULT_AIR_TEMPERATURE_CELSIUS, IN TemperatureScale temperatureScale = CELSIUS);
virtual void updateDistanceNonBlock()
Updates the distance of the Ultrasonic Module to the objects in a non-blocking way.
void updateDistance()
Updates the distance of the Ultrasonic Module to the objects in a blocking way.
DistanceMeterAccurate(IN uint8_t triggerPin, IN uint8_t echoPin)
Constructor.
float getDistanceCentimeters()
Gets the last value that the API measured using the Ultrasonic Module.
DistanceMeterNonBlock offers an API to interact with an Ultrasonic Module to measure distance in a no...
Definition: DistanceMeterNonBlock.h:47
DistanceMeterAccurate offers an API to interact with an Ultrasonic Module to measure distances consid...
Definition: DistanceMeterAccurate.h:50
~DistanceMeterAccurate()
Destructor.