Home Elements Boards Recipes

Color Displays based on ST7796

The DisplayST7796Element enables using ST7796 based TFT color displays.

This display uses the GFX Library for Arduino. It must be installed using the Arduino Library Manager.

brightness – set the brightness of the background light in the range 0…100

From my testings a value of 20 is usable in low light situations and a value of 80 fits to normal indoor situations.

Using the builtin LDR the light situation of the environment can be detected to adjust the brightness.

LDR 0 => 80 LDR 200 => 20

“mapInMin”: “0”, “mapOutMin” : “80”, “mapInMax”: “200”, “mapOutMin” : “20”,

lightpin // the pin used for PWM based backlight control

See also

Tags

Element Display