Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using wiringPi instead bcm2835 #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Using wiringPi instead bcm2835 #10

wants to merge 2 commits into from

Conversation

Xento
Copy link

@Xento Xento commented Dec 15, 2014

Makes node-dht-sensor compatible with banana pi.

Makes node-dht-sensor compatible with banana pi.
@momenso
Copy link
Owner

momenso commented Dec 16, 2014

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!

@Xento
Copy link
Author

Xento commented Dec 16, 2014

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.

@momenso
Copy link
Owner

momenso commented Dec 17, 2014

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.

@Xento
Copy link
Author

Xento commented Feb 1, 2015

What about my fix?

@momenso
Copy link
Owner

momenso commented Feb 2, 2015

Why are you using wiringPi, instead of BCM2835 directly?

@Xento
Copy link
Author

Xento commented Feb 3, 2015

Because i have an banana pi ;)

Am 02.02.2015 um 22:09 schrieb David Jose Momenso notifications@github.com:

Why are you using wiringPi, instead of BCM2835 directly?


Reply to this email directly or view it on GitHub.

@momenso
Copy link
Owner

momenso commented Feb 3, 2015

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.

@aziraphale aziraphale mentioned this pull request Feb 2, 2016
@inouiw
Copy link

inouiw commented Feb 23, 2016

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

@kothique kothique mentioned this pull request May 10, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants