You will see a few days ago I started to use three libraries (classes bmp280, bh1750, spg30) for a routine control of an irrigation system...
when i just declare a class it works perfectly...
the problem is when i initialize the others to pass to the wrapper class...
It tells me that the temperature instance is not declared in the bh1750... and it is like this...
I haven't worked with phyton for a long time and the truth is I find myself a bit lost...
Code: Select all
class IntegrateSensor :
def __init__(self):
self.humidity=0
self.temperature =0
self.lux=0
def set_humidity(self):
self.humidity=int(ahtx.read_humidity()) (this ath10 class)
def set_temperature(self):
self.temperature=int(ahtx.read_temperature())(this ath10 class)
def set_lux(self):
self.lux=int(BH.luminance()) (this bh class bh1750)
def get_humidity(self):
return self.humidity
def get_temperature(self):
return self.temperature
def get_lux(self):
return self.lux
thank