17 #ifndef _ADAFRUIT_DS3502_H 18 #define _ADAFRUIT_DS3502_H 23 #include <Adafruit_BusIO_Register.h> 24 #include <Adafruit_I2CDevice.h> 26 #define DS3502_I2CADDR_DEFAULT 0x28 28 #define DS3502_WIPER 0x00 29 #define DS3502_MODE 0x02 40 void setWiper(uint8_t new_wiper_value);
43 Adafruit_BusIO_Register
47 Adafruit_I2CDevice *i2c_dev;
Class that stores state and functions for interacting with the DS3502 I2C Potentiometer.
Definition: Adafruit_DS3502.h:35
void setWiper(uint8_t new_wiper_value)
Sets the potentiometer wiper to a new value.
Definition: Adafruit_DS3502.cpp:83
#define DS3502_I2CADDR_DEFAULT
DS3502 default I2C address.
Definition: Adafruit_DS3502.h:26
uint8_t getWiper(void)
Gets the current value of the wiper register.
Definition: Adafruit_DS3502.cpp:71
Adafruit_BusIO_Register * mode_selector
BusIO Register for selecting the write mode.
Definition: Adafruit_DS3502.h:44
void setWiperDefault(uint8_t new_wiper_default)
Sets the Wiper and IVR (Initial Value Register) to the given value.
Definition: Adafruit_DS3502.cpp:101
bool begin(uint8_t i2c_addr=DS3502_I2CADDR_DEFAULT, TwoWire *wire=&Wire)
Sets up the hardware and initializes I2C.
Definition: Adafruit_DS3502.cpp:52
Adafruit_DS3502()
Instantiates a new DS3502 class.
Definition: Adafruit_DS3502.cpp:42