Overview of EncButton features
mainEncButton provides high-performance handling for two main hardware components:
Button Support
- Event Processing: Handles clicks, long presses, hold, pulse hold, and click counters.
- Advanced Logic: Supports 'pre-clicks' (detecting clicks that occurred before a hold event) and can treat two simultaneous button presses as a third unique button event.
- Debouncing: Includes software-based debouncing.
Encoder Support
- Event Processing: Detects normal rotation, pressed rotation (button held while turning), and fast rotation.
- Precision: Uses a high-precision algorithm for position determination.
- Compatibility: Supports four different types of incremental encoders.
- Performance: Optimized for use within interrupts and uses buffering to ensure no steps are missed.
General Characteristics
- Low Overhead: Extremely small footprint (~5 bytes SRAM per instance, ~350 bytes Flash for button processing).
- Optimized Performance: Uses fast asynchronous polling and optimized pin reading for AVR, ESP8266, and ESP32 (via GyverIO).
- Virtual Mode: Supports working with pin expanders via virtual pin mapping.