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, address=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.

lut_mode_enabled

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

lut_selection

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, value)

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

temperature

The current temperature in degrees celcius

voltage

The current voltage between VCC and GND

wiper

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

wiper_default

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.