1.打开树莓派终端,输入以下命令,启用摄像头模块
sudo raspi-config
在配置界面中选择 "Interfacing Options" -> "Camera",选择 "Yes" 开启摄像头。(raspi-config的安装见博客https://www.cnblogs.com/linjun123/p/17298798.html)
若开启摄像头时出现 your firmware appears to be out of daye (no start_x.elf). please update,执行以下命令
sudo
mount
/dev/mmcblk0p1
/boot
或更新树莓派固件
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot
sudo wget https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
sudo reboot
2.设备连线
3.安装驱动
sudo pip install picamera
4.测试
raspistill -o test.jpg (拍图片)
raspivid -o test.h264 -t 10000 (拍10s的视频)
参考:
https://picamera.readthedocs.io/en/release-1.13/quickstart.html#testing
https://blog.csdn.net/sinat_25259461/article/details/108353324
https://linux.cn/article-3650-1.html
标签:树莓,sudo,update,https,ubuntu,rpi,摄像头 From: https://www.cnblogs.com/linjun123/p/17386007.html