Ubuntu Server 20.04.1 on Raspberry Pi 3B V2.1: "NewDHT error: pin out high error: sysfs-gpio (GPIO17): sysfs gpio is not initialized"
VictorSesma opened this issue · 2 comments
VictorSesma commented
Hello!
I have been trying to use the first reading example in the code.
As said in the title I am using Ubuntu server 20.04 64bits. I have tested this on Ubuntu 20.10 also. Checked in all 64 and 32 bits editions.
The thermometer works on Raspbian just fine using this library but it doesn't on Ubuntu. This is the error:
[ dht] WARN Error during call C.dial_DHTxx_and_read(): failed to open GPIO export for writing
The thermometer model is AOSONG AM2302
Do you know how this could be fixed?
Thanks a lot!
VictorSesma commented
Note: I also tried to use this other library and failed.
VictorSesma commented
Hello! The problem is fixed running the Go program with sudo. Lol. I guess there must be a way for giving permision to my user to run GPIO but I haven't investigated futher.
I close this issue now.
Thanks!