I have an Adafruit piTFT3.5 running on a pi zero running raspbian-light. For this specific project the screen brightness should be 0 until a python script tells it to turn on.
Right now I achieved this by running a the following in the rc.local script:
sudo sh -c 'echo "0" > /sys/class/backlight/soc\:backlight/brightness'
This turns the brightness of the screen to 0 as soon as rc.local is run. The problem is that rc.local is run far after the screen is configured so the screen turns on and then takes a second before turning off again which is not optimal since sometimes it displays things it had on it before the last reboot.
So it seems that the brightness of the piTFT is set in the sudo nano /sys/class/backlight/soc:backlight/brightness
location. The problem is that when the pi boots this always seems to be 1 even if it was set to 0 before the last reboot.
My question is if there is a way to have the bigness set to 0 at boot and then only turn on one my scripts sets it to 1 ?