Skip to content

Commit

Permalink
Update version to 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chandrawi committed Feb 22, 2022
1 parent 8c2846e commit d2f6e7f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 17 deletions.
15 changes: 6 additions & 9 deletions ADS1x15/ADS1x15.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from smbus2 import SMBus
import time

# Library version
LIB_VERSION = "1.2.1"

# ADS1x15 default i2c address
I2C_address = 0x48

Expand Down Expand Up @@ -309,7 +306,7 @@ class ADS1013(ADS1x15) :
"ADS1013 class derifed from general ADS1x15 class"

def __init__(self, busId: int, address: int = I2C_address) :
"Constructor with SMBus ID and I2C address input and configuration for ADS1013"
"Initialize ADS1013 with SMBus ID and I2C address configuration"
self.i2c = SMBus(busId)
self._address = address
self._conversionDelay = 2
Expand All @@ -322,7 +319,7 @@ class ADS1014(ADS1x15) :
"ADS1014 class derifed from general ADS1x15 class"

def __init__(self, busId: int, address: int = I2C_address) :
"Constructor with SMBus ID and I2C address input and configuration for ADS1014"
"Initialize ADS1014 with SMBus ID and I2C address configuration"
self.i2c = SMBus(busId)
self._address = address
self._conversionDelay = 2
Expand All @@ -335,7 +332,7 @@ class ADS1015(ADS1x15) :
"ADS1015 class derifed from general ADS1x15 class"

def __init__(self, busId: int, address: int = I2C_address) :
"Constructor with SMBus ID and I2C address input and configuration for ADS1015"
"Initialize ADS1015 with SMBus ID and I2C address configuration"
self.i2c = SMBus(busId)
self._address = address
self._conversionDelay = 2
Expand Down Expand Up @@ -375,7 +372,7 @@ class ADS1113(ADS1x15) :
"ADS1113 class derifed from general ADS1x15 class"

def __init__(self, busId: int, address: int = I2C_address) :
"Constructor with SMBus ID and I2C address input and configuration for ADS1113"
"Initialize ADS1113 with SMBus ID and I2C address configuration"
self.i2c = SMBus(busId)
self._address = address
self._conversionDelay = 8
Expand All @@ -388,7 +385,7 @@ class ADS1114(ADS1x15) :
"ADS1114 class derifed from general ADS1x15 class"

def __init__(self, busId: int, address: int = I2C_address) :
"Constructor with SMBus ID and I2C address input and configuration for ADS1114"
"Initialize ADS1114 with SMBus ID and I2C address configuration"
self.i2c = SMBus(busId)
self._address = address
self._conversionDelay = 8
Expand All @@ -401,7 +398,7 @@ class ADS1115(ADS1x15) :
"ADS1115 class derifed from general ADS1x15 class"

def __init__(self, busId: int, address: int = I2C_address) :
"Constructor with SMBus ID and I2C address input and configuration for ADS1115"
"Initialize ADS1115 with SMBus ID and I2C address configuration"
self.i2c = SMBus(busId)
self._address = address
self._conversionDelay = 8
Expand Down
4 changes: 3 additions & 1 deletion ADS1x15/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# __init__.py
from .ADS1x15 import LIB_VERSION

__version__ = "1.2.2"

from .ADS1x15 import ADS1x15
from .ADS1x15 import ADS1013
from .ADS1x15 import ADS1014
Expand Down
2 changes: 1 addition & 1 deletion examples/ADS_comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ADS = ADS1x15.ADS1115(1, 0x48)

print(os.path.basename(__file__))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))

# set gain to 4.096V max
ADS.setGain(ADS.PGA_4_096V)
Expand Down
2 changes: 1 addition & 1 deletion examples/ADS_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ADS = ADS1x15.ADS1115(1, 0x48)

print(os.path.basename(__file__))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))

ADS.setGain(ADS.PGA_4_096V)
ADS.setDataRate(ADS.DR_ADS111X_128)
Expand Down
2 changes: 1 addition & 1 deletion examples/ADS_differential.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
ADS = ADS1x15.ADS1115(1, 0x48)

print(os.path.basename(__file__))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))

# set gain to 4.096V max
ADS.setGain(ADS.PGA_4_096V)
Expand Down
2 changes: 1 addition & 1 deletion examples/ADS_minimum.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ADS = ADS1x15.ADS1115(1, 0x48)

print(os.path.basename(__file__))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))

# set gain to 4.096V max
ADS.setGain(ADS.PGA_4_096V)
Expand Down
2 changes: 1 addition & 1 deletion examples/ADS_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ADS = ADS1x15.ADS1115(1, 0x48)

print(os.path.basename(__file__))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))

# set gain to 4.096V max
ADS.setGain(ADS.PGA_4_096V)
Expand Down
2 changes: 1 addition & 1 deletion examples/ADS_read_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ADS = ADS1x15.ADS1115(1, 0x48)

print(os.path.basename(__file__))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))

# set gain to 4.096V max
ADS.setGain(ADS.PGA_4_096V)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ADS1x15-ADC
version = 1.2.1
version = 1.2.2
author = Chandra Wijaya Sentosa
author_email = [email protected]
description = Python library used for ADS1x15 analog to digital converter (ADC)
Expand Down

0 comments on commit d2f6e7f

Please sign in to comment.