树莓派7寸官方屏修改分辨率

树莓派7寸官方屏设置

1、备份启动配置文件
sudo cp /boot/config.txt /home/pi
拷贝boot下的config.txt到home/pi下

sudo chmod 777 config.txt
config.txt添加可编辑属性


2、config.txt配置
用文本编辑器打开config.txt,以下是示例

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1000
framebuffer_height=600

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
lcd_rotate=2




修改分辨率:官方屏默认分辨率为800*480,比例为5:3。config.txt中找到以下两行,去掉#号

framebuffer_width=1000
framebuffer_height=600

上下翻转屏幕,在最后一行加上
lcd_rotate=2


3、保存后打开终端,输入
sudo cp config.txt /boot/
拷贝config.txt到/boot/下。

4、重启

========================================================================================

第二种方法是将SD卡取出,在windows系统下修改config.txt。

发布了24 篇原创文章 · 获赞 17 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/huanghaoAudio/article/details/78314703