11#include "../../../../runtime/Runtime.hpp"
12#include "../../DistanceSensor.hpp"
159 bool mAttached{
false };
162 void measureDistance();
A parent class for all sensors that conduct distance measurements.
An interface to serve as a wrapper for the native runtime environment, greatly inspired by the Arduin...
The SRF08 sensor is an ultrasonic sensor that measures distances and communicates over the I2C bus.
unsigned long setPingDelay(unsigned long milliseconds=smartcarlib::constants::srf08::kDefaultPingDelay)
Delay between ranging measurements.
void setRange(uint8_t range)
Combined with the gain setting affects how much time each measurement will last as well as the maximu...
unsigned int getMedianDistance(uint8_t iterations=smartcarlib::constants::srf08::kDefaultIterations) override
Gets the median distance from the specified number of measurements.
unsigned int getDistance() override
Gets the distance measured by the sensor in centimeters.
uint8_t changeAddress(uint8_t newAddress)
Changes the address of the specific SRF08 sensor.
uint8_t getLightReading()
Conducts a measurement from the on-board light sensor.
void setGain(uint8_t gain)
Combined with the range setting affects how much time each measurement will last as well as the maxim...
const uint8_t kDefaultIterations
const uint8_t kDefaultPingDelay