diff --git a/.gitignore b/.gitignore index 1b372c9..6757a23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Eduponics/__pycache__/* dist/* +micropython_eduponics.egg-info/* diff --git a/Eduponics/__init__.py b/Eduponics/__init__.py index 92192ee..68cdeee 100644 --- a/Eduponics/__init__.py +++ b/Eduponics/__init__.py @@ -1 +1 @@ -__version__ = "1.0.4" +__version__ = "1.0.5" diff --git a/Eduponics/tds.py b/Eduponics/tds.py index 75163ab..f06ff66 100644 --- a/Eduponics/tds.py +++ b/Eduponics/tds.py @@ -25,7 +25,7 @@ import time from Eduponics import ads1x15 -from ulab import * +from ulab import array,numerical from machine import I2C, Pin import time @@ -72,7 +72,7 @@ def read(self): buffer = [value1,value2] self.overwrite_buffer(buffer) # turn the list into numpy array - double_buffer = numpy.array(self.values_buffer) + double_buffer = array(self.values_buffer) # run median_filter on the numpy array median_voltage = self.median_filter(double_buffer) * self.vref / 1024.0; # calculate voltage based on temperature compensation @@ -85,4 +85,4 @@ def read(self): return 0 def median_filter(self, data): - return numpy.mean(data) + return numerical.mean(data)