vash3d / pigpio_encoder

Python module for the KY040 rotary encoder.
GNU General Public License v3.0
14 stars 4 forks source link

The polling approach in the function "watch" saturates one CPU core. #3

Closed volkerjaenisch closed 4 years ago

volkerjaenisch commented 4 years ago

Introduced a new property "counter". Its setter is used as a trigger to call the rotary callback. Also I freed the pigpio handlers from the init since it looked a bit stuffed.