Hello together!
I figured out how to adjust the bightness of the LCD with just 1 click on desktop with Armbian.
It's really not a big thing, but maybe some "newbies" may like this
Thanks to pfeerick for his topic about LCD Support on Linux!
Step #1:
Create the script.
(Replace "YourUserName" with your username )
Save the file (F3) and close it (CTRL+X).
Step #2:
Using GPIO to increase/decrase.
Execute these commands as ROOT user!
Save the file (F3) and close it (CTRL+X).
Step #3:
Change sudoers settings
Execute these commands as ROOT user!
Add the following code to the end of the file:
Save the file (F3 if nano) and close it (CTRL+X if nano).
Step #4:
Add an icon to the taskbar (XFCE).
• Right click on the taskbar.
• Add a new element.
• Add a new "Launcher".
• Close the window and right click on the new launcher => Properties.
• Click on the right side "Create new object"
• Enter a custom Name for your Icon.
• Enter the command: sudo /home/YourUserName/brightness.sh
• You may set a icon.
• Create.
Step #5:
Now reboot your Pine64 and you're done!
Now you're able to change the brightness of the LCD with just 1 click!
It's nothing big as I already said
Best regards
Julian
I figured out how to adjust the bightness of the LCD with just 1 click on desktop with Armbian.
It's really not a big thing, but maybe some "newbies" may like this
Thanks to pfeerick for his topic about LCD Support on Linux!
Step #1:
Create the script.
(Replace "YourUserName" with your username )
Code:
nano /home/YourUserName/brightness.sh
Code:
#!/bin/bash
bright=/sys/class/gpio/gpio362/value
if grep -q "0" $bright; then
sudo echo 1 > $bright
else
sudo echo 0 > $bright
fi
Code:
chmod +x /home/YourUserName/brightness.sh
Step #2:
Using GPIO to increase/decrase.
Execute these commands as ROOT user!
Code:
nano /home/YourUserName/gpio-brightness.sh
Code:
#!/bin/bash
echo 362 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio362/direction
Code:
chmod +x /home/YourUserName/gpio-brightness.sh
Code:
(crontab -l ; echo "@reboot /bin/bash /home/YourUserName/gpio-brightness.sh")| crontab -
Step #3:
Change sudoers settings
Execute these commands as ROOT user!
Code:
visudo
Add the following code to the end of the file:
Code:
YourUserName ALL=NOPASSWD: /home/YourUserName/brightness.sh
Step #4:
Add an icon to the taskbar (XFCE).
• Right click on the taskbar.
• Add a new element.
• Add a new "Launcher".
• Close the window and right click on the new launcher => Properties.
• Click on the right side "Create new object"
• Enter a custom Name for your Icon.
• Enter the command: sudo /home/YourUserName/brightness.sh
• You may set a icon.
• Create.
Step #5:
Now reboot your Pine64 and you're done!
Now you're able to change the brightness of the LCD with just 1 click!
It's nothing big as I already said
Best regards
Julian
My forum topics:
• Create a WiFi hotspot on Debian 8
• Turn your Pine64 into a music server with mpd
• Adjust brightness of LCD on Armbian Desktop with 1 click
• My cases for Pine64 (acryl, lego & wood)
• Pine 64 - DACH - Facebook page for german-speaking Pine64-fans.
• Create a WiFi hotspot on Debian 8
• Turn your Pine64 into a music server with mpd
• Adjust brightness of LCD on Armbian Desktop with 1 click
• My cases for Pine64 (acryl, lego & wood)
• Pine 64 - DACH - Facebook page for german-speaking Pine64-fans.