node-dht-sensor
node-dht-sensor copied to clipboard
Using wiringPi instead bcm2835
Makes node-dht-sensor compatible with banana pi.
This is very good! I was thinking of using wiringPi for sometime now. Unfortunately I do not have a Banana Pi to test it but I have, however, tested it on a Raspberry Pi and it is no longer being able to read the sensor. My feeling is that it could be the delay functions. I will debug it further and get back to you as soon as I get an patch that works for the Raspberry Pi and It would be nice if you could validade it against the BananaPi (assuming you have one...) Thanks!
Yes I have a Banana Pi and it works like a charm. I wondered that it worked with such a small change. Did you adjust the pin number? WiringPi uses a different numbering.
Yeah, you're right! It was the pin numbering that is different. I'll leave it working for a while to see if I notice any problems. Thank you.
What about my fix?
Why are you using wiringPi, instead of BCM2835 directly?
Because i have an banana pi ;)
Am 02.02.2015 um 22:09 schrieb David Jose Momenso [email protected]:
Why are you using wiringPi, instead of BCM2835 directly?
— Reply to this email directly or view it on GitHub.
Ok, I understand. You have a fair point and your implementation is good. The problem is that wiringPi not only adds another dependency to the project but also breaks compatibility with existing GPIO numbering convention. Therefore, this change would affect many applications already deployed out there and I really want to avoid this problem.
Because the bananaPi also uses the BCM2835 chip it should be possible to access the GPIO in a similar way without requiring wiringPi but so far I did not find any references to this approach. Perhaps a closer look into wiringPi may reveal how to implement this.
Thanks for the changes Xento, based on them I can now run my script without sudo. I forked this repository, made the same changes as you and made wiringPi to use GPIO numbering. See https://github.com/HardwareProjects/node-dht-sensor