2.0 Inch Display with RotaryEncoder and Button
TBD
this module can be found on several websites to a reasonable price.
The package from the shipping was labelled M65-2.0TFT-BianMa but the module itself had no labels. Have a look to the pictures to identify wether you have the exact same board. It was not hard to find out the connector functions and that the display needs 3.3V.
The module contains the following components:
- a Color 320 x 240 pixel 2.0 inch TFT display based on the ST7796 chip using the SPI bus.
- a RotaryEncoder with push functionality
- and a separate push button.
All signals from these components are available on the 12 pin connector pins above the panel.
I found the layout practical to use the 4 holes in the corners to mount it against a front panel.
Connector Pins
The connector above the panel gives access to the following signals:
| Pin | Label | Function |
|---|---|---|
| 1 | GND | Common Ground signal |
| 2 | VDD | +3.3V |
| 3 | SCL | SPI Clock |
| 4 | SDA | SPI MOSI |
| 5 | RES | Display Reset |
| 6 | DC | SPI Data/Command |
| 7 | CS | SPI Chip Select |
| 8 | BLK | Background light, +3.3V |
| 9 | TRA | RotaryEcoder Signal A |
| 10 | TRB | RotaryEcoder Signal B |
| 11 | PSH | RotaryEcoder Push |
| 12 | K0 | Key 0 Push |
RotaryDown LOW when Rotary is pressed Down Key0 LOW when KEY0 is pressed Down
RotaryEcoder Push and Key 0 Push
The 2 signals PSH and K0 can directly be used as a Digital Input. They are delivering HIGH output when not pressed and will come to LOW when pressed.
Both signals are always high when the knob is not in movement. There a 4 signal changes when moving the knob for 1 step.
The configuration when using the RotaryEncoder library is


