This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTU21D humidity value
#3
(2016-03-22, 06:35 PM)Sailoog Wrote: Please, I need to see that meat dryer when is done Huh

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? Tongue

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
Reply


Messages In This Thread
HTU21D humidity value - by Swokey - 2016-03-22, 02:46 PM
RE: HTU21D humidity value - by Sailoog - 2016-03-22, 06:35 PM
RE: HTU21D humidity value - by Swokey - 2016-03-22, 09:42 PM
RE: HTU21D humidity value - by Vamonos - 2016-03-23, 02:17 AM
RE: HTU21D humidity value - by Sailoog - 2016-03-23, 09:10 PM
RE: HTU21D humidity value - by Swokey - 2016-03-27, 07:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)