Documentation
Features
- I²C bus operating up to 400 kHz
- Customizable I²C address via 7 onboard SMD solder jumpers
- Supports both standard rotary encoders and illuminated RGB rotary encoders
- LED gamma correction support
- Automatic LED fading support
- Open‑drain interrupt output pin, eliminating the need for continuous device polling
- Castellated holes on all four sides allow multiple boards to be connected together
- 5‑pin header with 2.54 mm pitch on the left and right sides; compatible with JST‑XH connectors
- 3 general‑purpose I/O pins (GP pins)
- 256 bytes of internal EEPROM, divided into two 128‑byte banks
- Operating voltage range: 3.3 V to 5 V
- Maximum A/B signal frequency: 100 Hz (tested)
- Board dimensions: 25 × 25 mm (0.98 × 0.98 in)
- Open‑source firmware
Details
The board is powered by the PIC16F18345 microcontroller, offering an increased number of GPIOs and expanded EEPROM memory compared to earlier designs.
It supports both standard rotary encoders and illuminated RGB rotary encoders. Castellated holes are available on all four sides of the board, allowing multiple boards to be soldered together and arranged in matrix‑style configurations.

The I2C Encoder includes pre‑soldered pull‑up resistors on the I²C bus, which can be enabled by soldering the corresponding jumper.

The I2C Encoder can be used in two different configurations:
- With a standard rotary encoder. An external RGB LED can be added, or the 3 GPIO pins can be used
- With an illuminated RGB rotary encoder, leaving 2 GPIO pins available
Reading the Encoder
Reading the encoder is straightforward and handled through four registers:
- CVAL: Current encoder value, updated on each rotation
- CMAX: Maximum value that CVAL can reach
- CMIN: Minimum value that CVAL can reach
- ISTEP: Increment applied to CVAL at each encoder step
These registers can be configured as 32‑bit signed integers or IEEE 754 floating‑point values.
LED Control
The I2C Encoder can directly control LEDs using a 10‑bit PWM. Gamma correction can be enabled to improve color accuracy and visual smoothness.
GPIOs
The board provides three configurable GPIO pins arranged with the same footprint as an RGB LED, labeled GP1, GP2, and GP3.
When an RGB rotary encoder is used, two GPIOs (GP1 and GP2) remain available.
Available GPIO configurations:
- PWM: Suitable for driving RGB LEDs
- Analog: Connected to the internal ADC for sensors or potentiometers
- Digital Output: Standard digital output mode
- Digital Input: Standard digital input with optional edge‑triggered interrupt
Projects
Package Includes
1 × I2C Encoder board, fully programmed (encoder, connector, and LED not included)















