Gozem / am2320

Code to access an AM2320 via i2c on Raspberry Pi
MIT License
31 stars 19 forks source link

There's a bug with your sensor #2

Closed rhubarbdog closed 2 years ago

rhubarbdog commented 6 years ago

I've modified am2320.py to read the sensor in an infinite loop and print it before sleeping for 5 seconds. when you do this the problem eventually occurs OSError : Too many open files. The line before the return in readSensor method from class AM2320 should read [code]posix.close(fd)[/code]

Gozem commented 6 years ago

Thanks for the report. I'll see when I find time to fix it.

Gozem commented 2 years ago

Merged, thanks.