I'm using ->this 3.5" TFT Touchscreen with MCUFRIEND_kbv.h and TouchScreen.h on an AZ Delivery Mega2560. Everything is working fine so far, but I was thinking of turning the screen of completely while the Arduino does some things where it's not needed.
Is there a command (haven't found any in the examples of the library) to completely turn it off and on again? It's not possible to control the 3.3V and 5V of the Mega as they are no digital pins, right?
Filling it with black or something like that is not what I'm aiming for because I make an initial input on the screen and have the Arduino working for hours without needing the screen in that time - thus the idea to turn it of in the meantime.
Check the data sheet of the display to learn if there is a "blank screen" command.
It is a very bad idea to turn off a display (or a sensor), while connected to a powered MCU via I/O pins, as that can lead to damage or malfunction of one or both devices.
A blank screen command would still draw power and have the backlight enabled (lots of threads here about that topic ). That's what I've meant with "filling it with black". I don't think there is such a command, at least I haven't found it in the doc: GitHub - prenticedavid/MCUFRIEND_kbv: MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields and the Adafruit GFX documentation. But I appreciate the tip about the turning of of a powered MCU, so that seems also to be a bad idea. Thanks for the warning.