Happy Halloween from Adafruit! Check out some scary #electronichalloween posts, the frightening Halloween section and spooky videos!

November 2, 2012 AT 7:00 am

Example for Using GPIO GCC Libraries on a Pi for Temp/Humidity Sensor Data #piday #raspberrypi @Raspberry_Pi

Check out this nice example of using the GPIO gcc libraries on a Pi (for those of us who want a break from writing Python code) from John.Geek.NZ who has been exploring this and other Raspberry Pi subjects for a couple of months:

After a few comments regarding my code to read data from a Sensirion SHT1x with a Raspberry Pi, I’ve got some updated code.

Please see my previous post for general information, but use the code here.

The list of changes are:

  • Added Dewpoint calculation from Page 9 of Datasheet
  • Updated Humidity calculation Coefficients to recommended (12 bit) figures from Page 8 of Datasheet
  • Updated Temperature calculation Coefficients to recommended (3.3 Volt Interpolated) figures from Page 9 of Datasheet.

If you want to read humidity sensor data into your Pi – check out our tutorial and compatible sensors!

DHT22TempHumidSensor

AM2302 TempHumidSensor


998Each Friday is PiDay here at Adafruit, be sure to check out our posts, tutorials and new Raspberry Pi related products. Have you tried the new “Adafruit Raspberry Pi Educational Linux Distro” ? It’s our tweaked distribution for teaching electronics using the Raspberry Pi. But wait, there’s more! Try our new Raspberry Pi WebIDE! The easiest way to learn programming on a Raspberry Pi.

Want a FREE RASPBERRY PI? All orders over $350 get a FREE Raspberry Pi Model B with 512MB RAM!


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!



No Comments

No comments yet.

Sorry, the comment form is closed at this time.