-
Notifications
You must be signed in to change notification settings - Fork 53
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
Error during call C.dial_DHTxx_and_read(): failed to open pin 22 direction for writing on Raspberry PI3 #24
Comments
hm, sudo solved that problem:
|
Hi @hyzhak. Nice to hear that you found workaround! It is curious that without sudo it doesn't work... I can't recall why I did not face with this problem, but probably this can help: https://stackoverflow.com/questions/30938991/access-gpio-sys-class-gpio-as-non-root |
oh! great it is very helpful, I'd try to avoid sudo as much as possible :) |
Hello, I got the same error and sudo seems to 'fix'. I dig a little more and find that the commit adding support for DHT12 introduce this behavior
With the following one, I got the
|
I read the diff between versions and came accross this bce0dc9#diff-a9f55f7fcb9cb447f152c9128faea88fL166
Uncommenting this sleep_usec fix the issue as stated in the comment. |
I have the same problem, but 'sudo' does not solve it: I get the following on pin 29: and on pin 35: Using iono Pi max with Rpi 3 CM Lite Needless to mention that all good with Adafruit python library. |
got the same issue, it doesn't work with sudo
is this project abandoned? |
I am also getting this error when trying to run the sample code in the readme file using a raspberry pi v4 |
I've tried code from example1:
compiled and run by:
got error:
in the same time tried to use DHT from https://github.com/adafruit/Adafruit_Python_DHT (python lib) and it worked fine.
Also I've tried to connect to different pins, but got the same result -- works fine on python and doesn't work on golang lib :(.
The text was updated successfully, but these errors were encountered: