Adafruit PCT2075 Arduino Library
Public Member Functions | Public Attributes | List of all members
Adafruit_PCT2075 Class Reference

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

#include <Adafruit_PCT2075.h>

Public Member Functions

 Adafruit_PCT2075 ()
 Instantiates a new PCT2075 class.
 
boolean begin (uint8_t i2c_addr=PCT2075_I2CADDR_DEFAULT, TwoWire *wire=&Wire)
 Sets up the hardware and initializes I2C. More...
 
float getTemperature (void)
 Gets the current temperature measurement. More...
 
float getIdleTime (void)
 Gets the amount of time the sensor waits between measurements. More...
 
void setIdleTime (float new_idle_time)
 Sets the amount of time the sensor waits between measurements. More...
 
void setActiveHigh (bool active_high)
 Sets the polarity of the INT pin. More...
 
float getHighTemperatureThreshold (void)
 Gets the high temperature threshold in degrees C. More...
 
void setHighTemperatureThreshold (float new_temp_threshold)
 Sets the high temperature threshold in degrees C. More...
 
float getTemperatureHysteresis (void)
 Gets the temperature hysteresis value in degrees C. More...
 
void setTemperatureHysteresis (float temp_hysteresis)
 Sets the temperature hysteresis value in degrees C. More...
 
pct2075_mode_t getMode (void)
 Gets the high temperature alert mode. More...
 
void setMode (pct2075_mode_t mode)
 Sets the high temperature alert mode. More...
 
pct2075_fault_count_t getFaultCount (void)
 Gets the fault count. More...
 
void setFaultCount (pct2075_fault_count_t)
 Sets the fault count. More...
 

Public Attributes

Adafruit_BusIO_Register * CONFIG
 BusIO Register for CONFIG.
 

Detailed Description

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

Member Function Documentation

◆ begin()

boolean Adafruit_PCT2075::begin ( uint8_t  i2c_address = PCT2075_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.

◆ getTemperature()

float Adafruit_PCT2075::getTemperature ( void  )

Gets the current temperature measurement.

Returns
The current temperature in degrees C. Resolution is 0.125 C

◆ getIdleTime()

float Adafruit_PCT2075::getIdleTime ( void  )

Gets the amount of time the sensor waits between measurements.

Returns
The amount of idle time in seconds

◆ setIdleTime()

void Adafruit_PCT2075::setIdleTime ( float  new_idle_time)

Sets the amount of time the sensor waits between measurements.

Parameters
new_idle_timeThe new idle time in seconds. Must be >= 0.1, <= 3.2 and a multiple of 0.1 (100 ms)

◆ setActiveHigh()

void Adafruit_PCT2075::setActiveHigh ( bool  active_high)

Sets the polarity of the INT pin.

Parameters
active_highThe polarity of the INT pin. If false the INT pin is Hi-Z on alert. If true, the INT pin is connected to ground on alert.

◆ getHighTemperatureThreshold()

float Adafruit_PCT2075::getHighTemperatureThreshold ( void  )

Gets the high temperature threshold in degrees C.

Returns
The current high temperature threshold in degrees C. Resolution is 0.5 C

◆ setHighTemperatureThreshold()

void Adafruit_PCT2075::setHighTemperatureThreshold ( float  new_temp_threshold)

Sets the high temperature threshold in degrees C.

Parameters
new_temp_thresholdThe new high temperature threshold in degrees C. Resolution is 0.5 C

◆ getTemperatureHysteresis()

float Adafruit_PCT2075::getTemperatureHysteresis ( void  )

Gets the temperature hysteresis value in degrees C.

Returns
The temperature hysteresis value in degrees C. Resolution is 0.5 C

◆ setTemperatureHysteresis()

void Adafruit_PCT2075::setTemperatureHysteresis ( float  temp_hysteresis)

Sets the temperature hysteresis value in degrees C.

Parameters
temp_hysteresisThe new high temperature threshold in degrees C. Resolution is 0.5 C

◆ getMode()

pct2075_mode_t Adafruit_PCT2075::getMode ( void  )

Gets the high temperature alert mode.

Returns
The high temperature alert mode

◆ setMode()

void Adafruit_PCT2075::setMode ( pct2075_mode_t  mode)

Sets the high temperature alert mode.

Parameters
modeThe mode to set. Must be a pct2075_mode_t

◆ getFaultCount()

pct2075_fault_count_t Adafruit_PCT2075::getFaultCount ( void  )

Gets the fault count.

Returns
The pct2075_fault_count_t signifying the number of faults needed to raise an alert.

◆ setFaultCount()

void Adafruit_PCT2075::setFaultCount ( pct2075_fault_count_t  fault_count)

Sets the fault count.

Parameters
fault_countThe number of faults needed to raise an alert.

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