2016-03-22, 09:42 PM
(2016-03-22, 06:35 PM)Sailoog Wrote: Please, I need to see that meat dryer when is done
Your code should look like this:
Code:import RTIMU, time
SETTINGS_FILE3 = "RTIMULib3"
s3 = RTIMU.Settings(SETTINGS_FILE3)
humidity_val = RTIMU.RTHumidity(s3)
humidity_val.humidityInit()
humidity=''
temperature_h=''
#here starts the bucle
while True:
time.sleep(1)#here you can define the frequency in seconds
read=humidity_val.humidityRead()
if read:
if (read[0]):
humidity=read[1]
if (read[2]):
temperature_h=read[3]
print humidity
print temperature_h
Not tested but it should work, let me know if you get some error.
And please when you are done please publish something in Brag Board subforum.
Should I add Meat Dryer as OpenPlotter feature?
Thanks a lot. Change the code a bit to:
Code:
import RTIMU, time
SETTINGS_FILE3 = "RTIMULib3"
s3 = RTIMU.Settings(SETTINGS_FILE3)
humidity_val = RTIMU.RTHumidity(s3)
humidity_val.humidityInit()
humidity=''
temperature_h=''
#here starts the bucle
while True:
time.sleep(0.5)#here you can define the frequency in seconds
read=humidity_val.humidityRead()
if read:
if (read[0]):
humidity=read[1]
print humidity
But the strange thing is that every 4th value is a strange value:
46.4964027405
46.4964027405
46.4964027405
2.17024011051e+33
46.4582557678
46.4582557678
46.4582557678
2.17024011051e+33
46.4277381897
46.4277381897
46.4277381897
2.17024011051e+33
46.4369735718
46.4369735718