Adafruit DS3502 Arduino Library
Public Member Functions | Public Attributes | List of all members
Adafruit_DS3502 Class Reference

Class that stores state and functions for interacting with the DS3502 I2C Potentiometer. More...

#include <Adafruit_DS3502.h>

Public Member Functions

 Adafruit_DS3502 ()
 Instantiates a new DS3502 class.
 
bool begin (uint8_t i2c_addr=DS3502_I2CADDR_DEFAULT, TwoWire *wire=&Wire)
 Sets up the hardware and initializes I2C. More...
 
uint8_t getWiper (void)
 Gets the current value of the wiper register. More...
 
void setWiper (uint8_t new_wiper_value)
 Sets the potentiometer wiper to a new value. More...
 
void setWiperDefault (uint8_t new_wiper_default)
 Sets the Wiper and IVR (Initial Value Register) to the given value. More...
 

Public Attributes

Adafruit_BusIO_Register * mode_selector
 BusIO Register for selecting the write mode.
 

Detailed Description

Class that stores state and functions for interacting with the DS3502 I2C Potentiometer.

Member Function Documentation

◆ begin()

bool Adafruit_DS3502::begin ( uint8_t  i2c_address = DS3502_I2CADDR_DEFAULT,
TwoWire *  wire = &Wire 
)

Sets up the hardware and initializes I2C.

Parameters
i2c_addressThe I2C address to be used.
wireThe Wire object to be used for I2C connections.
Returns
True if initialization was successful, otherwise false.

◆ getWiper()

uint8_t Adafruit_DS3502::getWiper ( void  )

Gets the current value of the wiper register.

Returns
The 7-bit wiper value.

◆ setWiper()

void Adafruit_DS3502::setWiper ( uint8_t  new_wiper_value)

Sets the potentiometer wiper to a new value.

Parameters
new_wiper_valueThe new wiper value to set. Must be from 0-127

◆ setWiperDefault()

void Adafruit_DS3502::setWiperDefault ( uint8_t  new_wiper_default)

Sets the Wiper and IVR (Initial Value Register) to the given value.

Parameters
new_wiper_defaultThe new wiper default to be set the wiper and default wiper value to. The wiper register will be set to the given value when written and when the device is powered on. Must be from 0-127

The documentation for this class was generated from the following files: