I’m a complete beginner with Arduino/ESP32 and just starting to learn.
I’m working on a weight measurement system using HX711 and an ESP32-C6-DevKitC-1.
At first, I tested my setup with:
- Adafruit Monochrome 1.12" 128x128 OLED via I2C
- LCD 2004 (20x4) with PCF8574A I2C adapter
Both worked fine using the I2C interface.
Now, I’m trying to connect a bigger display: WG240128B-TFH-TZ with an RA6963 chip. It has 20 pins. I found a pinout for a similar display.
I tried following this tutorial: Arduino With T6963c 240x128 Graphic LCD but it didn’t work.
Could someone guide me how to connect it using the U8glib or U8g2 library? Or maybe suggest another way to get it working with ESP32-C6?
Thanks in advance!
#define Serial Serial0
#define D0 9
#define D1 18
#define D2 19
#define D3 20
#define D4 21
#define D5 22
#define D6 23
#define D7 15
#define CD 4
#define WR 5
#define RD 6
#define CE 11
#define RST 10
Sorry, almost forgot — here is the wiring diagram I made:
Please let me know if something looks wrong or if I should wire it differently.
Just found the documentation for my exact display model (WG240128B-TFH-TZ):
WG240128B-TFH-TZ.pdf (1.4 МБ)
#include <Arduino.h>
#include <Wire.h>
#include "U8g2lib.h"
#define Serial Serial0
#define CD 4
#define WR 5
// #define RD 6
#define CE 10
#define RST 11
#define D0 9
#define D1 18
#define D2 19
#define D3 20
#define D4 21
#define D5 22
#define D6 23
#define D7 15
// #define DT 2
// #define SCK 3
U8G2_T6963_240X128_1_8080 u8g2(U8G2_R0, D0, D1, D2, D3, D4, D5, D6, D7, /*enable/wr=*/ WR, /*cs/ce=*/ CE, /*dc=*/ CD, /*reset=*/RST); // Connect RD with +5V, FS0 and FS1 with GND
void setup(void) {
Serial.begin(115200);
u8g2.begin();
}
void loop(void) {
u8g2.firstPage();
do {
u8g2.drawHLine(0,0,10);
u8g2.drawHLine(0,31,10);
u8g2.setFont(u8g2_font_ncenB10_tr);
u8g2.drawStr(0,20,"Hello World!");
} while ( u8g2.nextPage() );
delay(1000);
}