Specifications
- Detects direction and number of clicks
- Built-in button (press the shaft), pressed = LOW
- The module goes on top of the tower
- Power 3.3 V (pull-ups inside the ESP32)
- Current below 1 mA
- Does not use the I2C bus
- Uses: control wheel, setting values, menus
Pins
| Pin | Function |
|---|---|
| IO7 | CLK, signal A (rotation) |
| IO8 | DT, signal B (rotation) |
| IO13 | Button |
Wiring diagram
Example code
Try the example Guess the number right in your browser in Eduingo AI Lab. The computer secretly picks a number from 1 to 20. Turn the knob to choose your guess and press the knob to try it. The display gives you a hint: "VIC" means the secret number is bigger, "MIN" means it is smaller. When you get it right, "SUPER" scrolls by and you see how many tries it took. Try to find it as fast as you can: always guess the middle.