Before starting compiling ESP32 based sketches, you must configure your Arduino IDE. Follow the steps below:
Observe in the following diagram and table that the connections between the ESP32 and the QN8066, as well as the encoder and the LCD, refer to the GPIO and not to the physical pin number of the ESP32 module board. Carefully analyze the pin distribution of your ESP32 to make the correct connections
Device name | Device Pin / Description | Arduino Pin |
---|---|---|
LCD 16x2 or 20x4 | ||
D4 | GPIO18 | |
D5 | GPIO17 | |
D6 | GPIO16 | |
D7 | GPIO15 | |
RS | GPIO19 | |
E/ENA | GPIO23 | |
RW & VSS & K (16) | GND | |
A (15) & VDD | +Vcc | |
QN8066 | ||
VCC | 3.3V | |
SDIO / SDA (pin 2) | GPIO21 [1] | |
SCLK (pin 1) | GPIO22 [1] | |
Encoder | ||
A | GPIO13 | |
B | GPIO14 | |
PUSH BUTTON (encoder) | GPIO27 | |
PWM | ||
GPIO12 |