20#include <sfTk/sfToolkit.h>
23#include <sfTk/sfTkII2C.h>
65 sfTkError_t
begin(sfTkII2C *theBus =
nullptr);
89 uint8_t _fwVersion = 0x00;
Definition: sfDevUltrasonicDist.h:47
sfTkError_t changeAddress(uint8_t &address)
Changes the I2C address of older Qwiic Ultrasonic sensors.
Definition: sfDevUltrasonicDist.cpp:72
sfTkError_t isConnected()
Checks if the Qwiic Ultrasonic sensor is connected.
Definition: sfDevUltrasonicDist.cpp:44
sfTkII2C * _theBus
Definition: sfDevUltrasonicDist.h:86
sfDevUltrasonicDist()
Default constructor.
Definition: sfDevUltrasonicDist.h:51
sfTkError_t triggerAndRead(uint16_t &distance)
Triggers a new measurement and reads the previous one.
Definition: sfDevUltrasonicDist.cpp:51
sfTkError_t begin(sfTkII2C *theBus=nullptr)
Begins the Qwiic Ultrasonic sensor.
Definition: sfDevUltrasonicDist.cpp:18
uint8_t getAddress()
Gets the current I2C address being used by the library for the Qwiic Ultrasonic sensor.
Definition: sfDevUltrasonicDist.cpp:115
sfDevUltrasonicDist(const uint8_t fwVersion)
Alternate constructor.
Definition: sfDevUltrasonicDist.h:58
const uint8_t kQwiicUltrasonicI2CAddressMin
Definition: sfDevUltrasonicDist.h:35
const uint8_t kQwiicUltrasonicMinAddress
Definition: sfDevUltrasonicDist.h:39
const uint8_t kUltrasonicDistanceReadCommand
Definition: sfDevUltrasonicDist.h:43
const uint8_t kQwiicUltrasonicDefaultAddress
Definition: sfDevUltrasonicDist.h:26
const uint8_t kQwiicUltrasonicFWOld
Definition: sfDevUltrasonicDist.h:31
const uint8_t kQwiicUltrasonicI2CAddressMax
Definition: sfDevUltrasonicDist.h:36
const uint8_t kQwiicUltrasonicFWLatest
Definition: sfDevUltrasonicDist.h:30
const uint8_t kQwiicUltrasonicMaxAddress
Definition: sfDevUltrasonicDist.h:40
const uint8_t kUltrasonicAddressChangeCommand
Definition: sfDevUltrasonicDist.h:44