d2r2 / go-dht

Golang library to interact with DHT11/DHT22/DHT12 temperature and humidity sensors from Raspberry PI.
MIT License
133 stars 52 forks source link

Code fails on RPI-Zero but not on RPI-3 #12

Closed mmussett closed 5 years ago

mmussett commented 6 years ago

Hi,

Tested on RPI 3B+, tried running on RPI-Zero and it fails with the following error:

Error during call C.dial_DHTxx_and_read(): failed to export pin 4

Any help much appreciated.

d2r2 commented 5 years ago

Hi @mmussett! Sorry for late responce. Main assumption - hardware pin used to attach Sensor data wire, doesn't match pin 4.

You should verify this using such pinout schemes: https://raspberrypi.stackexchange.com/questions/83610/gpio-pinout-orientation-raspberypi-zero-w