-
Notifications
You must be signed in to change notification settings - Fork 0
/
LCD DimmerNEW.txt
21 lines (19 loc) · 819 Bytes
/
LCD DimmerNEW.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
LCD Backlight LED Dimmer Circuit and Code
How to adjust the LCD backlight:
The Schematic:
(See T_Display_S3shematic.png)
says that GPIO38 is ESP_LCD_BLK, which can be pulsed to enable the clever chip "AW9364DNR" to dim the four LCD LED backlights (LEDK1 ~ 4) here:
(See LCD_Dimmer.png)
Using the upper left button you can control the display brightness, by pushing on and off or continuously to dim the display.
Once at the dimmest it will return to full brightness.
Add this code to your Arduino Sketch:
Setup:
pinMode(PIN_LCD_BL, OUTPUT); //controls the LCD backlight
pinMode(topbutton, INPUT); //Left button pulled up, push = 0
Loop
if (!digitalRead(topbutton)) { //pressed is off
digitalWrite(PIN_LCD_BL, LOW);
delayMicroseconds(200);
digitalWrite(PIN_LCD_BL, HIGH);
}
delay(200);