1- # The MIT License (MIT)
1+ # SPDX-FileCopyrightText: 2019 Bryan Siepert for Adafruit Industries
22#
3- # Copyright (c) 2019 Bryan Siepert for Adafruit Industries
4- #
5- # Permission is hereby granted, free of charge, to any person obtaining a copy
6- # of this software and associated documentation files (the "Software"), to deal
7- # in the Software without restriction, including without limitation the rights
8- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9- # copies of the Software, and to permit persons to whom the Software is
10- # furnished to do so, subject to the following conditions:
11- #
12- # The above copyright notice and this permission notice shall be included in
13- # all copies or substantial portions of the Software.
14- #
15- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21- # THE SOFTWARE.
3+ # SPDX-License-Identifier: MIT
4+
225"""
236`adafruit_ds3502`
247================================================================================
6548class DS3502 :
6649 """Driver for the DS3502 I2C Digital Potentiometer.
6750
68- :param ~busio.I2C i2c_bus: The I2C bus the DS3502 is connected to.
69- :param address: The I2C device address for the sensor. Default is ``0x40``.
51+ :param ~busio.I2C i2c_bus: The I2C bus the DS3502 is connected to.
52+ :param address: The I2C device address for the sensor. Default is ``0x40``.
7053 """
7154
7255 def __init__ (self , i2c_bus , address = 0x28 ):
@@ -82,7 +65,7 @@ def __init__(self, i2c_bus, address=0x28):
8265 def wiper (self ):
8366 """The value of the potentionmeter's wiper.
8467
85- :param wiper_value: The value from 0-127 to set the wiper to.
68+ :param wiper_value: The value from 0-127 to set the wiper to.
8669 """
8770 return self ._wiper
8871
@@ -95,7 +78,7 @@ def wiper(self, value):
9578 def set_default (self , default ):
9679 """Sets the wiper's default value and current value to the given value
9780
98- :param new_default: The value from 0-127 to set as the wiper's default.
81+ :param new_default: The value from 0-127 to set as the wiper's default.
9982 """
10083 self ._write_only_to_wiper = False
10184 self .wiper = default
0 commit comments