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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.