37 #define SRF02_DEFAULT_ADDR (0xe0)
42 #define SRF02_RANGE_DELAY (70000U)
int srf02_init(srf02_t *dev, i2c_t i2c, uint8_t addr)
Initialize the SRF02 ultrasonic sensor.
Possible measurement modes of the SRF02 sensor.
void srf02_set_addr(srf02_t *dev, uint8_t new_addr)
Program the given device with a new bus address.
result in cm (no pulse send)
unsigned int i2c_t
Default i2c_t type definition.
I2C device the sensor is connected to.
void srf02_trigger(srf02_t *dev, srf02_mode_t mode)
Trigger a new measurement.
result in ms (no pulse send)
result in inches (no pulse send)
I2C bus address of the sensor.
uint16_t srf02_read(srf02_t *dev)
Read the results of the last ranging operation.
Device descriptor for SRF02 sensors.
uint16_t srf02_get_distance(srf02_t *dev, srf02_mode_t mode)
Get the distance measured from the SRF02 ultrasonic sensor.
Low-level I2C peripheral driver interface definition.