Reliability issues
I've been playing with this and when it works, it's great, but it fails about 40-50% of the time.
Error conditions can be:
- Checksum error
- hangs indefinitely (like forever)
- write /sys/class/gpio/gpioN/value: operation not permitted (running as root)
To work around the hanging issue, I put my calls to sensor.Temperatore() inside a channel that can have a timeout. Thus now I run a poll on the temp sensor every 10 seconds. Again, 40-50% of the polls fail. After several hours, I'm also getting a Too Many Open Files issue, which could be the go channel cutting off the indefinite hang condition without closing a file.
I'm not sure where to look at this code to improve the reliability. I've browsed it a bit, but don't know.
Are you seeing any of these issues?
If you'd like to look at my code which is using this library, (it probably isn't wonderful) it's available here. https://github.com/stahnma/sensor_poll
@stahnma I got the same problem, have you found workaround of this issue?