December 2018
Dim Adafruit screen on startup
28/12/18 15:00
Create a script with the following code in the pi home folder:
Save it as: dim_screen
Make the file executable using this command:
Open /home/pi/.config/lxsession/LXDE-pi/autostart using nano and then add the following line:
#!/bin/bashgpio -g mode 18 pwm && gpio pwmc 1000 && gpio -g pwm 18 50 && sudo sh -c 'echo "0" > /sys/class/backlight/soc\:backlight/brightness'
Save it as: dim_screen
Make the file executable using this command:
chmod u+x dim_screen
Open /home/pi/.config/lxsession/LXDE-pi/autostart using nano and then add the following line:
@sh /home/pi/dim_screen