Difference between revisions of "How to control the backlight brightness with PWM(7-B/7-C)"
Line 7: | Line 7: | ||
<br><br> | <br><br> | ||
− | + | Connect the Raspberry Pi: | |
<br><br> | <br><br> | ||
[[File:7-C-背光控制-21.jpg|500px]] | [[File:7-C-背光控制-21.jpg|500px]] | ||
<br><br> | <br><br> | ||
− | + | Perform the following command on the Raspberry Pi 3B/3B+ terminal to control the backlight brightness: | |
<pre> | <pre> | ||
Line 20: | Line 20: | ||
</pre> | </pre> | ||
− | + | (The value of X should be between 0 and 1024) | |
<br><br><br> | <br><br><br> | ||
− | + | In Raspberry Pi 4B, you need to update the wiringPi GPIO library (Raspberry Pi needs to connect to the Internet): | |
<pre> | <pre> | ||
cd /tmp | cd /tmp | ||
Line 29: | Line 29: | ||
</pre> | </pre> | ||
− | + | Execute the following command to control the backlight brightness: | |
<pre> | <pre> | ||
gpio -g pwm 18 1024 | gpio -g pwm 18 1024 | ||
Line 37: | Line 37: | ||
</pre> | </pre> | ||
− | + | (The value of X should be between 0 and 1024) |
Revision as of 15:39, 13 June 2020
This method is only available for 7-B Rev3.2, 7-C Rev3.3 or above
Connect the Raspberry Pi:
Perform the following command on the Raspberry Pi 3B/3B+ terminal to control the backlight brightness:
gpio -g pwm 18 1024 gpio -g mode 18 pwm gpio pwmc 1000 gpio -g pwm 18 X
(The value of X should be between 0 and 1024)
In Raspberry Pi 4B, you need to update the wiringPi GPIO library (Raspberry Pi needs to connect to the Internet):
cd /tmp wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i -B wiringpi-latest.deb
Execute the following command to control the backlight brightness:
gpio -g pwm 18 1024 gpio -g mode 18 pwm gpio pwmc 1000 gpio -g pwm 18 X
(The value of X should be between 0 and 1024)