Skip to content

Commit bf97edd

Browse files
committed
bug fixes
1 parent 1e2ce23 commit bf97edd

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Eduponics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.0"
1+
__version__ = "1.0.2"

Eduponics/ads1x15.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@
114114

115115

116116
class ADS1115:
117-
def __init__(self, i2c, ads_address=0x48, gain=1, mcp_address=0x20):
117+
def __init__(self, i2c, address=0x48, gain=1, mcp_address=0x20):
118118
self.i2c = i2c
119119
self.address = address
120120
self.mcp_address = mcp_address
121121
self.gain = gain
122122
self.temp2 = bytearray(2)
123123
# define MCP for activating MOSFET pins
124-
mcp = mcp23017.MCP23017(self.i2c, mcp_address)
124+
mcp = mcp23017.MCP23017(self.i2c, address=mcp_address)
125125
# define all the pins for the mosfets
126126
self.mcp_pins_sheet = {
127127
0:8,

Eduponics/tds.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@
3131

3232
class TDS():
3333

34-
def __init__(self,channel=0,temperature=25,i2c=None,mcp_address=None,ads_address=None):
34+
def __init__(self, channel=0, temperature=25, i2c=None, mcp_address=0x20, ads_address=0x49):
3535
self.channel = channel
3636
self.kvalue = 1.0
3737
self.temperature = temperature
3838
self.values_buffer = [] # empty list of values for median average
3939
self.scount = 30 # how many times to take samples to make median average
4040
self.vref = 4.096 # analog reference voltage(Volt) of the ADC, based on ADS chip gain 1
4141
# Open i2c bus
42-
self.ads_address = 0x49
43-
self.mcp_address = 0x20
42+
self.ads_address = ads_address
43+
self.mcp_address = mcp_address
4444
self.gain = 1
45-
self.adc = ads1x15.ADS1115(i2c, ads_address=self.ads_address, mcp_address=self.mcp_address, self.gain)
45+
self.adc = ads1x15.ADS1115(i2c, address=self.ads_address, mcp_address=self.mcp_address, self.gain)
4646

4747
def overwrite_buffer(self, item):
4848
self.values_buffer.insert(0, item)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
packages=find_packages(),
1616
include_package_data=True,
1717
version=__version__,
18-
download_url = 'https://github.com/STEMinds/micropython-eduponics/archive/1.0.1.tar.gz',
18+
download_url = 'https://github.com/STEMinds/micropython-eduponics/archive/1.0.2.tar.gz',
1919
keywords = ['micropython','upython', 'eduponics-mini', 'esp32', 'ADS1x15', 'MCP23017'],
2020
description='',
2121
long_description='',

0 commit comments

Comments
 (0)