adafruit_ds1841
¶
Library for the DS1841 I2C Logarithmic Resistor
Author(s): Bryan Siepert
Implementation Notes¶
Hardware:
Adafruit’s DS1841 Breakout: https://www.adafruit.com/product/4570
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- 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 usinglut_selection