一、安装抓图软件fswebcam
sudo apt-get install fswebcam
二、添加截图和上传命令 新建文件test.sh 并写入一下内容
sudo fswebcam -d /dev/video0 -r 320x240 --bottom-banner --title "RaspberryPi @ Dingdayu" --no-timestamp /home/pi/test1.jpg
curl --form "file=@/home/pi/test1.jpg" -H "U-ApiKey: dingdayu" http://192.168.1.154/test/?s=Home/Index/upload >> /home/pi/post.log
提升权限(可选)
chmod +x yeelink.sh
三、加入定时脚本
crontab -e
在最后添加
*/1 * * * * /home/pi/test.sh
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有