【树莓派】树莓派问题合集

1、树莓派系统备份

  • 参考链接:

  • https://cloud.tencent.com/developer/article/1932800
    http://www.360doc.com/content/17/0805/03/40492717_676751545.shtml
    http://www.fendou.info/raspberry-pi-sd-card-backup-and-recovery/
    新建一个.img文件 然后使用Win32DiskImager的Read按钮读取内存卡就可以了。

  • 老版本树莓派系统安装QT5
    https://blog.csdn.net/weixin_40490238/article/details/83932180

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
sudo apt-get install qt5-default
sudo apt-get install qtcreator
  • 新版本树莓派系统安装Qt请参考:
  • https://blog.csdn.net/SmartTiger_CSL/article/details/130308528
    4.安装QtQuick库
    sudo apt-get install qtdeclarative5-dev
    5.安装QtMultimedia库
    sudo apt-get install qtmultimedia5-dev
    sudo apt-get install libqt5multimedia5-plugins
    6.安装QtMySQL库
    sudo apt-get install libqt5sql5-mysql
    7.安装串口运行库
    sudo apt-get install libqt5serialport5
    8.安装串口开发包
    sudo apt-get install libqt5serialport5-dev

2、控制摄像头
参考链接:
http://www.cirmall.com/bbs/thread-106051-1-1.html
https://www.cnblogs.com/uestc-mm/p/7587783.html
https://blog.csdn.net/fhqlongteng/article/details/80433633 (5.3节是最简单的)
https://blog.csdn.net/u011303443/article/details/52518369 (简明)

sudo apt install motion
sudo cp /etc/motion/motion.conf /etc/motion/motion.conf.bak
sudo vim /etc/motion/motion.conf
(将motion.conf改为下面形式:
daemon on                        #开启守护进程(选配)
target_dir /home/pi/motion-images    #图片保存的路径
#videodevice /dev/video0            #摄像头设备(默认)可修改            
stream_localhost off                 #允许通过网页查看摄像头。**必须off否则只能本地web查看**
stream_auth_method 2               #开启密码认证
stream_authentication 用户名:密码    #网页查看摄像头的用户名和密码
)
mkdir ~/motion-images
sudo service motion start
sudo motion

motion官方配置:http://lavrsen.dk/foswiki/bin/view/Motion/ConfigFileOptions

3、树莓派每个GPIO电流很小带不动大电机
http://ju.outofmemory.cn/entry/118339
结论:树莓派引脚电流大小的限制是:每个引脚最大输出电流为16毫安(mA),且同一时刻所有引脚的总输出电流不超过51毫安。
4、树莓派监测外部电压问题
我有个板子引脚每秒输出一次高电压。但是我用树莓派引脚连在一起缺读取不到引脚的高电压。但是灯泡是每秒亮一次的。
把树莓派和板子的GND接起来就可以了。

5、 USB 读写
树莓派Qt安装串口库:https://www.cnblogs.com/wangha/p/10559834.html

sudo apt-get install libqt5serialport5
sudo apt-get install libqt5serialport5-dev

6、树莓派学习论坛
http://www.waveshare.net/study/portal.php?mod=list&catid=29

7、树莓派红外线遥控
https://www.jianshu.com/p/9cfb0bf02006
https://blog.csdn.net/perry0418/article/details/83796035
https://blog.csdn.net/waterseason/article/details/84916642
http://www.waveshare.net/study/article-622-1.html

8、树莓派挂载磁盘只能读取

https://shumeipai.nxez.com/2013/09/08/raspberry-pi-to-mount-the-removable-hard-disk.html

9、在树莓派官方系统中使用QtWebengine
https://blog.csdn.net/qq_36470971/article/details/105194082

10、树莓派自动连接wifi(优先级链接)

在这里插入图片描述https://blog.csdn.net/zxr15709447338/article/details/86467582
https://www.cnblogs.com/playboysnow/p/4987103.html

只添加优先级priority即可,不要修改:/etc/network/interfaces配置文件,不要在在文件尾部加入如下配置:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

开启SSH

点击树莓派界面左上角的树莓图标,点Preferences的这个图标,再点击下面倒数第二个树莓图标打开树莓派的设置。

在这里插入图片描述
在这里插入图片描述

https://www.jianshu.com/p/721c2604ed46

关机重启

安全关机:

sudo shutdown -h now
sudo halt
sudo poweroff
sudo init 0

安全重启:
sudo reboot
shutdown -r now

树莓派更改源

参考链接:https://zhuanlan.zhihu.com/p/98079246

sudo vim /etc/apt/sources.list
屏蔽 其它源,添加如下清华源
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib

sudo vim /etc/apt/sources.list.d/raspi.list
屏蔽 其它源,添加如下清华源
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui

树莓派使用自带edit打开文件

sudo mousepad /etc/apt/sources.list

树莓派散热风扇

  • 向里吹散热效果好但灰尘多。向外侧相反。
  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

肖恭伟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值