adafruit_ds1841

Library for the DS1841 I2C Logarithmic Resistor

  • Author(s): Bryan Siepert

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_ds1841.DS1841(i2c_bus: I2C, address: int = 40)

Driver for the DS3502 I2C Digital Potentiometer. :param ~busio.I2C i2c_bus: The I2C bus the DS3502 is connected to. :param address: The I2C device address for the sensor. Default is 0x28.

property lut_mode_enabled: bool

Enables LUT mode. LUT mode takes sets the value of the Wiper based on the entry in a 72-entry Look Up Table. The LUT entry is selected using the lut_selection property to set an index from 0-71

property lut_selection: int

Choose the entry in the Look Up Table to use to set the wiper. :param index: The index of the entry to use, from 0-71.

set_lut(index: int, value: int) None

Set the value of an entry in the Look Up Table. :param index: The index of the entry to set, from 0-71. :param value: The value to set at the given index. The wiper will be set to this value when the LUT entry is selected using lut_selection

property temperature: int

The current temperature in degrees celsius

property voltage: float

The current voltage between VCC and GND

property wiper: int

The value of the potentionmeter’s wiper. :param wiper_value: The value from 0-127 to set the wiper to.

property wiper_default: int

Sets the wiper’s default value and current value to the given value :param new_default: The value from 0-127 to set as the wiper’s default.