joan2937 / pigpio

pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).
The Unlicense
1.43k stars 403 forks source link

Python DHT11 Example: DHT11 Class __iter__ does not work. #577

Open lennart-rth opened 1 year ago

lennart-rth commented 1 year ago

TypeError: iter() returned non-iterator of type 'DHT11'

Fix: Change the function next() to next. Without that the Iter() does not work properly and therefore you cant iterate over sensor values in a for-loop.