MicroPython DS3502 Driver¶
ds3502
¶
MicroPython Driver for the DS3502 Potentiometer
All Code adapted for Micropython from: https://github.com/adafruit/Adafruit_CircuitPython_DS3502
Author(s): Bryan Siepert, Jose D. Montoya
-
class micropython_ds3502.ds3502.DS3502(i2c, address: int =
0x28
)[source]¶ Driver for the DS3502 Sensor connected over I2C.
- Parameters:¶
Quickstart: Importing and using the device
Here is an example of using the
DS3502
class. First you will need to import the libraries to use the sensorfrom machine import Pin, I2C from micropython_ds3502 import ds3502
Once this is done you can define your
machine.I2C
object and define your sensor objecti2c = I2C(1, sda=Pin(2), scl=Pin(3)) ds3502 = ds3502.DS3502(i2c)