Author Topic: Homemade Weather Station using a Raspberry Pi  (Read 74575 times)

0 Members and 1 Guest are viewing this topic.

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #75 on: August 14, 2015, 11:04:10 AM »
I'm planning on building my own weather station too once I get the money for it. I'm thinking of using the Arduino Yún instead of the Raspberry Pi. What do you guys think?

Personally I love the raspberry pi and now with the raspberry pi 2 out for only 35 dollars you can't go wrong.  But here are some pros and cons for each system as I see them. Note this is not an extensive list and really depends on what you are trying to do in the end.

Raspberry Pi Pros:
- Fully blown linux OS onboard. Whatever you can do on your desktop you can do here. Example, I connected my old usb webcam for a sky cam via the usb port.
- Cost 42 dollars on Amazon.
- The RPi 2 has quad core processing and clams to be 6 times faster than the old RPi. I can do a heck of a lot with my single core. Quad core should be fantastic!
- Creating programs in Python is very easy and there are plenty of examples.
- Has a camera port. Spend $25 and you can get a camera module that gives you HD video. It uses the GPU for processing so there is very little overhead.
- Has 40 GPIO ports. Some of these ports are used for digital comms like SPI and I2C but the rest are your normal digital pulse input/output. You can measure pulses from a tipping rain gauge, a wind speed sensors, or anything else that sends a 3.3v signal. Also you can drive LEDs via these ports.

Raspberry Pi Cons:
- No Wifi. Might not be a big deal but for me I use wifi for everything so I need to buy usb wifi adapters everything I buy a RPi.
- No ADC. If you are measuring analog signal which you most likely will with a weather station you will need to add a ADC board to the Raspberry Pi. Not hard to do but again another expense.
- Not a realtime system. Because it is running linux you won’t have realtime access to the CPU. There are ways around this if you really need it but normally having to wait a few ms on a measurement because Linux is doing something else isn’t bad.

Arduino Yun Pros:
- Intergraded solution. It has ADC ports, Digital ports and Wifi all wrapped up in one package.
- User community is extensive. I noticed this while looking for stuff for the Raspberry pi. There are plenty of examples to do anything with an Arduino.
-Arduino Yun Cons:
- Its ADC is only 10 bits which means it can only resolve 1024 points. This might not be a problem unless you are trying to measure something low power or want high precision. For me I measure voltage from my Pyranometer which needs the extra precision from a 12bit ADC.
- It looks like the Arduino Yun is running linux on it as well. Arduino are normally known for their realtime access. Looks like you would lose that here.

Of course I am a RPi user so I know a lot more about that system than Arduino. With that said, part of building weather stations is the joy of learning something new and having fun. You can easily build a weather station with the Arduino just as you can with the Raspberry pi or Intel Galileo or any other embedded linux board. Take my information with a grain of salt and remember to post your results here so we can see all the cool stuff you end up doing.

Nickolas 
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Homemade Weather Station using a Raspberry Pi
« Reply #76 on: August 14, 2015, 11:38:06 AM »
Looks like a bit of an All-in-one (wifi etc.)  Interesting.  The RPi of course is a bit more standalone - HDMI out etc. plus there are currently a zillion accessories for it.  But the YUN does look interesting...  I suspect it would make a really nice remote wx station.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline Red Dragon

  • Member
  • *
  • Posts: 34
    • Weather Chipmunk
Re: Homemade Weather Station using a Raspberry Pi
« Reply #77 on: August 14, 2015, 03:47:04 PM »
I was thinking of using it because I plan to use lots of sensors both analog and i2c and the Arduino has all that built in. How many i2c devices can I have connected?

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #78 on: August 14, 2015, 04:06:33 PM »
I was thinking of using it because I plan to use lots of sensors both analog and i2c and the Arduino has all that built in. How many i2c devices can I have connected?

i2c sensors are digital sensors that have unique ids attached to them. You connect them all up to the same port and the device (RPi or Aduinio) will query that device. I forgot how many devices you can have but  it is a lot( >32). the issue of course is that you can only query one device at a time. I have three I2c devices, pressure, lightning sensor and temp/rh. I only sample them every second so I have plenty of time to do all three... If you are going to do high frequency on a large number of sensors then this isn't going to work for you. I believe i2c works the same on both systems.

If you are going to do a lot of analog sensors and the 10bit resolution is ok for you then the Arduino might be your better choice. Adding analog ports to the RPi can cost up to 10 dollars per 8 channels. You could be cheap and build your own board and use the MCP3208 which cost like 4 dollars but extra skill is required for that.

Nickolas
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #79 on: August 15, 2015, 08:59:52 AM »
I'm planning on building my own weather station too once I get the money for it. I'm thinking of using the Arduino Yún instead of the Raspberry Pi. What do you guys think?

The one problem I am having is that the Pi gives me an error and the wind sensor reads 2 mph until I reboot.

"kernel:[376818.053540] Disabling IRQ #49"

It was happening ever few days but it has been over a week now.  Very odd. I have not found much about it online.
I may swap out the Pi with another to see if that fixes it.

Greg

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #80 on: August 15, 2015, 02:53:41 PM »
Greg, How is your system configured? Are you using python to read the port? If so what modules are you using to read the GPIO port.

A search on the internet shows that this could be a driver problem or perhaps a module problem. I would rule out software before going to hardware.

I can assist where i can. Do you have code?
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #81 on: August 15, 2015, 03:28:45 PM »
Greg, How is your system configured? Are you using python to read the port? If so what modules are you using to read the GPIO port.

A search on the internet shows that this could be a driver problem or perhaps a module problem. I would rule out software before going to hardware.

I can assist where i can. Do you have code?



Hi, thanks. I am using python. I'll try to attached it. I have a copy of your code you had posted before, but I have not had much time to look at it and compare. I'm just letting weewx call the script every 20 seconds, so it could miss wind gusts etc. I'm using the weewx fileparse module.

I still need to add the code for my rain gauge.  I did get those better quality temp sensors also, I just need to wire it up to the Pi.  Which I may try to do this weekend. I made a simple radiation shield out of a couple of yogurt cups for now. I also have a UV sensor and I got some Teflon sheets to make a housing for it. I'm just using the radiation value for UV for now. Thanks, Greg

My wind code is :

####### Wind speed
count = 0
GPIO.setmode(GPIO.BCM)     # set up BCM GPIO numbering
GPIO.setup(18, GPIO.IN)    # set GPIO18 as input


# Define a threaded callback function to run in another thread when events are detected
def my_callback(channel):
    global count
   # print GPIO.input(channel)
    if GPIO.input(18):     # if port 25 == 1
       # print "Rising edge detected"
        count = count +1

windspeed = 0
conversion = 1
factor = 0.31
count = 0

GPIO.add_event_detect(18, GPIO.BOTH, callback=my_callback)

try:
    start = time.time()
    delay = 4
    sleep(delay)         # wait
    stop = time.time()
    timeI = stop - start
    #print ' time = ' + str(timeI)
    finalcount = count

    rev = finalcount/timeI/8
    rev2 = finalcount/timeI
    windspeed = (rev2 * 0.31)
#    print 'count='+ str(finalcount)
#    print 'total revolutions = ' +str(finalcount/8)
#    print 'revolutions per sec= ' +str(rev)
#    print " wind speed = %.3f mph" % (windspeed)

finally:                   # this block will run no matter how the try block exits
      GPIO.cleanup()         # clean up after yourself



Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #82 on: August 15, 2015, 03:29:40 PM »
Here's the whole script file.
Thanks, Greg

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #83 on: August 15, 2015, 04:56:26 PM »
Greg,

I am not sure exactly how you run it but is it possible weewx is running this script back to back. If this script is currently running and weewx summons it again it will fail because the GPIO ports will be in use from the first script.

Running your script once at start up and having it loop every 20 seconds via a while loop would only initiate the hardware once and might fix your IRQ issues.

I like the fact you detect rising and falling pulses and then check its status to verify the pulse is real. This is a software filter that I just added to my code to increase its robustness. You will need such code for your precip sensor. Great minds must think alike.

The more I am thinking of your problem the more I am thinking your script is not the problem. Do you have wifi? How much power can your power supply give? I had problems with mine until I got to 2Amp output on my supply. Of course that is with a B (no plus) so it uses a lot more power than say a A+. I am thinking you check your power supply and if you have something beefier give it a shot. Also if you have a voltmeter use it to measure the 5 volt rail on the raspberry pi. You should be around 4.8v or higher when the system is running.
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #84 on: August 15, 2015, 05:45:20 PM »
Greg,

I am not sure exactly how you run it but is it possible weewx is running this script back to back. If this script is currently running and weewx summons it again it will fail because the GPIO ports will be in use from the first script.

Running your script once at start up and having it loop every 20 seconds via a while loop would only initiate the hardware once and might fix your IRQ issues.

I like the fact you detect rising and falling pulses and then check its status to verify the pulse is real. This is a software filter that I just added to my code to increase its robustness. You will need such code for your precip sensor. Great minds must think alike.

The more I am thinking of your problem the more I am thinking your script is not the problem. Do you have wifi? How much power can your power supply give? I had problems with mine until I got to 2Amp output on my supply. Of course that is with a B (no plus) so it uses a lot more power than say a A+. I am thinking you check your power supply and if you have something beefier give it a shot. Also if you have a voltmeter use it to measure the 5 volt rail on the raspberry pi. You should be around 4.8v or higher when the system is running.

I had it outside with a wifi dongle but it would disconnect once in a while. I moved it inside and ran wires from the sensors. So it's hooked up directly. I have a 2amp power supply and I checked the voltage a while back, if I remember, it was 5.0v. This one is a Pi 2.

When it gives the error the other sensors work fine, just the wind speed.  I have a couple of other Pis that have cameras on for security and the only problems I had with them were cheap cards that failed after a couple of months.

I still wonder if the add_event_detect and clean up being called all the time would cause trouble? Vs a while loop running all the time like you have?

Thanks for the help.


Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #85 on: August 15, 2015, 08:42:08 PM »


My AdaFruit ADC stopped working.  :-( All I did was look to see where I need to hook up my new temp/hum sensor and turn the Pi back on. I posted something on the Adafruit forum. I had lost one channel a couple of months ago. I just unsolder from the one to a working one since there are 4 channels. But now,"Error accessing 0x48: Check your I2C address" . Using i2cdetect command it's not there.  I had bought a spare to play with but I have to remove it from the board.


Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #86 on: August 16, 2015, 12:35:14 AM »


My AdaFruit ADC stopped working.  :-( All I did was look to see where I need to hook up my new temp/hum sensor and turn the Pi back on. I posted something on the Adafruit forum. I had lost one channel a couple of months ago. I just unsolder from the one to a working one since there are 4 channels. But now,"Error accessing 0x48: Check your I2C address" . Using i2cdetect command it's not there.  I had bought a spare to play with but I have to remove it from the board.

Well that isn't good. Perhaps that was causing your problems with the wind speed as well? Either way I have had adafruit replace bad hardware before. They are very good and stand behind what they sell. Sounds like you got a bad board.
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #87 on: August 16, 2015, 08:24:38 AM »

Well that isn't good. Perhaps that was causing your problems with the wind speed as well? Either way I have had adafruit replace bad hardware before. They are very good and stand behind what they sell. Sounds like you got a bad board.

I'm not sure if that was causing the wind speed problem, it is on GIPO 18 vs the ADC on I2C.  I posted in their forum and they want me to take a photo.

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #88 on: August 16, 2015, 10:09:41 AM »
Strange, I took some photos and put it back together and it's working again. I wonder if I have a bad connection or something is intermittent on the breakout board?

Offline TejasBob

  • Member
  • *
  • Posts: 6
Re: Homemade Weather Station using a Raspberry Pi
« Reply #89 on: August 22, 2015, 10:25:45 PM »
Can you paste or send your current script please, Nick?  I'm trying to get my SHT25 working and am using a script I found for the SHT21.  The math seems to match but I'd like to make sure.  Also I'm curious about setting it to 12/14 bits.

Thanks.
Bob

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #90 on: August 25, 2015, 05:24:43 PM »
Can you paste or send your current script please, Nick?  I'm trying to get my SHT25 working and am using a script I found for the SHT21.  The math seems to match but I'd like to make sure.  Also I'm curious about setting it to 12/14 bits.

Thanks.
Bob

The code I posted here a little while back is current. I just noticed I called it AM2315 instead of the SHT25, typo on my part(which I corrected). The script for SHT21 is the same for SHT25. I just used a module from someone and I don't even remember who. I believe it might be this code: https://github.com/jaques/sht21_python

Also per the Datasheet the default measurement is 14(temp)/12(RH). I have no idea how to change back and forth between resolution.

Good luck with the SHT25. I have had it for almost a year outside in my FARS and it has worked flawlessly.

Nickolas
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #91 on: August 26, 2015, 08:54:09 PM »
Nick, how does the rain gauge work in weewx with your station?  I see your code saves  a time stamp and a string to a log file:

# Function that counts rain
def callback_precip(channel):

    global precip_pulse_cnt
    #precip_pulse_cnt = precip_pulse_cnt + 1  # each tip 1/100 inch
    f = open('/home/weewx/bin/rain.log', 'a')
    datetime = strftime("%Y-%m-%d %H:%M:%S ", localtime())
    f.write(datetime + ' Precip detected 0.01 \n')
    f.close()

    # turn off precip until error fixed. Make sure to turn it on below as well
    precip_pulse_cnt = 0



 I'm using fileparse with weewx. Does weewx figure out a new rain gauge tip/event based on the time stamp?

My Davis wind sensors stopped working, I'll have to open it up to see what's going on, it's more than 10 years old. At least my DIY works until I get that error.

Thanks, Greg

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #92 on: August 26, 2015, 10:53:32 PM »
Nick, how does the rain gauge work in weewx with your station?  I see your code saves  a time stamp and a string to a log file:

# Function that counts rain
def callback_precip(channel):

    global precip_pulse_cnt
    #precip_pulse_cnt = precip_pulse_cnt + 1  # each tip 1/100 inch
    f = open('/home/weewx/bin/rain.log', 'a')
    datetime = strftime("%Y-%m-%d %H:%M:%S ", localtime())
    f.write(datetime + ' Precip detected 0.01 \n')
    f.close()

    # turn off precip until error fixed. Make sure to turn it on below as well
    precip_pulse_cnt = 0



 I'm using fileparse with weewx. Does weewx figure out a new rain gauge tip/event based on the time stamp?

My Davis wind sensors stopped working, I'll have to open it up to see what's going on, it's more than 10 years old. At least my DIY works until I get that error.

Thanks, Greg

Well it looks like I posted my code with the rain sensor commented out. I had a heck of a time getting precip to work because it uses the GPIO port which turns out to be very sensitive to lightning and other sources of interference.

The code should read like this:

# Function that counts rain
def callback_precip(channel):

    global precip_pulse_cnt
    precip_pulse_cnt = precip_pulse_cnt + 1  # each tip 1/100 inch
    f = open('/home/weewx/bin/rain.log', 'a')
    datetime = strftime("%Y-%m-%d %H:%M:%S ", localtime())
    f.write(datetime + ' Precip detected 0.01 \n')
    f.close()

    # turn off precip until error fixed. Make sure to turn it on below as well
    #precip_pulse_cnt = 0


I timestamp it because I have other debug code to help me figure out the noise problem I was having. You could simpify the code to read like this:

# Function that counts rain
def callback_precip(channel):

    global precip_pulse_cnt
    precip_pulse_cnt = precip_pulse_cnt + 1  # each tip 1/100 inch[\i]

So the logic is as such:
1.) rain tips the bucket and closes the circuit
2.) The closed circuit is a pulsed measured by the GPIO port.
3.) The code is set to trigger the callback_precip funtion on every tip.
4.) Ever second, the code counts how much rain has fell and resets the counter to 0
5.) The code outputs a one second loop file that gets read by weewx.

Hope that helps.

Nickolas
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline Red Dragon

  • Member
  • *
  • Posts: 34
    • Weather Chipmunk
Re: Homemade Weather Station using a Raspberry Pi
« Reply #93 on: August 27, 2015, 09:44:27 PM »
I found a article about how to increase the sampling bits for the adc on the Ardiuno by using oversampling. http://www.electricrcaircraftguy.com/2014/05/using-arduino-unos-built-in-16-bit-adc.html

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #94 on: August 28, 2015, 08:23:51 AM »

So the logic is as such:
1.) rain tips the bucket and closes the circuit
2.) The closed circuit is a pulsed measured by the GPIO port.
3.) The code is set to trigger the callback_precip funtion on every tip.
4.) Ever second, the code counts how much rain has fell and resets the counter to 0
5.) The code outputs a one second loop file that gets read by weewx.

Hope that helps.

Nickolas

Thanks Nicolas. I need to look at the weewx loop code for rain. I'm still not sure how that works. If it gets set to 0 too early will weewx miss the event?

Greg

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #95 on: August 28, 2015, 05:08:24 PM »

So the logic is as such:
1.) rain tips the bucket and closes the circuit
2.) The closed circuit is a pulsed measured by the GPIO port.
3.) The code is set to trigger the callback_precip funtion on every tip.
4.) Ever second, the code counts how much rain has fell and resets the counter to 0
5.) The code outputs a one second loop file that gets read by weewx.

Hope that helps.

Nickolas

Thanks Nicolas. I need to look at the weewx loop code for rain. I'm still not sure how that works. If it gets set to 0 too early will weewx miss the event?

Greg


The beauty of sensors on the GPIO port is that they are monitoring via separate threads. So while my main code loops every second, wind pulses and rain pulses are measured independently. I just read the global variables every second and then set to 0 so it could start counting again. 

Nickolas
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #96 on: August 28, 2015, 05:17:40 PM »
I found a article about how to increase the sampling bits for the adc on the Ardiuno by using oversampling. http://www.electricrcaircraftguy.com/2014/05/using-arduino-unos-built-in-16-bit-adc.html

In my analog to digital code for the solar sensor you can see I pull 100 samples than average to get the result. It turns out I may have inadvertent stumbled on oversampling.

Thanks for pointing this out so I actually know what I am doing instead of guessing. I thought I was doing something wrong by having to sample so many time to get a good value (especially when the value was very small) turns out this is how it is done unless I wanted to upgrade to a 14/16bit ADC.

Nickolas
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline weathernick

  • Senior Member
  • **
  • Posts: 90
Re: Homemade Weather Station using a Raspberry Pi
« Reply #97 on: September 17, 2015, 06:55:35 PM »
Quote
The beauty of sensors on the GPIO port is that they are monitoring via separate threads. So while my main code loops every second, wind pulses and rain pulses are measured independently. I just read the global variables every second and then set to 0 so it could start counting again. 

Well it turns out this is a lie... Python doesn't do real threads unless you do some extra work. All code will be executed sequentially. This normally shouldn't be a problem unless you do something that ties up the CPU. The detection of GPIO pulse might be independent of the code but once it triggers the subroutine it is done sequentially. 

Turns out the RPi can sample through my code many times over per second so I am good.

Nickolas
PWS: Custom built with Raspberry Pi collecting the data from the sensors.
CWOP: EW5462
Wunderground: KAZYUMA27
Personal WX page: http://mccolls.weewx.s3-website-us-east-1.amazonaws.com/

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Homemade Weather Station using a Raspberry Pi
« Reply #98 on: September 17, 2015, 07:56:37 PM »
You got the first part right.  GIL prevents simultaneous thread execution.  But I guarantee you that you can  execute multiple threads concurrently or in parallel and it can really speed things up.  Not a big deal either.  But not what you would expect if you were say, a C++ programmer.  (Not I am talking about v3.n and up) 
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline thorn

  • Senior Member
  • **
  • Posts: 51
Re: Homemade Weather Station using a Raspberry Pi
« Reply #99 on: November 12, 2015, 05:44:42 PM »

The code I posted here a little while back is current. I just noticed I called it AM2315 instead of the SHT25, typo on my part(which I corrected). The script for SHT21 is the same for SHT25. I just used a module from someone and I don't even remember who. I believe it might be this code: https://github.com/jaques/sht21_python

Also per the Datasheet the default measurement is 14(temp)/12(RH). I have no idea how to change back and forth between resolution.

Good luck with the SHT25. I have had it for almost a year outside in my FARS and it has worked flawlessly.

Nickolas


My AM2315 from AdaFruiit finally failed too. So I got it working with a SHT21 and so far so good. Also, I have not seen the wind error since I did an update to the Pi. Going on 3 months. I guess they must have fixed a bug.

I did have some trouble with the AdaFruit ADC again after I added the SHT21. It gave me the same error. I moved some of the wires around and away from each other and it is OK. I don't think AdaFruit will replace it, they claim it's from "environmental damage". Most likely it is from being outside or static they said. I have it inside now and before it was in a water proof box. I guess they don't stand by their products.

Now I need to take the time to the rain bucket code to work.

Greg