Close

DHT22 is good to go!

A project log for Lua Pi Pan

Lua pi pan is my take on home IoT using lua and raspberry pi's

philmo6PhilMo6 11/13/2016 at 03:030 Comments

After I found out the rpio library wasn't doing the trick for reading DHT22 sensors I finally took the dive and started learning c. Took me a couple days to get enough down to figure out the Lua c API and write a wrapper for a c function that uses wiringPi to bit bang the sensor. As a super nice bonus it works waaaay faster but it does require Lua pi pan to be run with sudo if its being used with the DHT22 module. I'm very tempted to write a full wrapper for wiringPi and switch GPIO libraries again to take advantage of the reading speed...

The source and .so file are on GitHub page if anyone wants to check it out.

Discussions