# 老汽车副屏项目
家里的手动挡老车只配了个收音机,没有中控屏,没有蓝牙,于是想利用家里吃灰的树莓派做个汽车副中控屏,功能暂订如下,
- 3.5寸屏
- 显示时间、天气、新闻等
- 蓝牙功能
- …
# 前置条件
- 熟悉Linux系统
- 熟悉Docker
- 了解MagicMirror项目
# 预备材料
- 树莓派3B
- LCD3.5寸屏
- 树莓派官方Buster镜像
# 项目预览
# 操作步骤
# 设置树莓派密码
sudo -I
passwd
passwd pi
# 开机启动ssh服务并允许root用户登录
sudo nano /etc/ssh/sshd_config
# 给树莓派Linux buster系统换源
# 编辑 sudo nano `/etc/apt/sources.list` 文件,删除原文件所有内容,用以下内容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi
# 编辑 sudo nano `/etc/apt/sources.list.d/raspi.list` 文件,删除原文件所有内容,用以下内容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui
# 更新与升级树莓派buster系统
sudo apt update -y
sudo apt upgrade -y
# 安装Docker服务
curl -sSL https://get.daocloud.io/docker | sh
# 给Docker换源并设置开机启动Docker服务
sudo nano /etc/docker/daemon.json
{ "registry-mirrors": [ "https://hub-mirror.c.163.com", "https://ustc-edu-cn.mirror.aliyuncs.com", "https://ghcr.io", "https://mirror.baidubce.com" ] }
sudo systemctl daemon-reload
sudo systemctl enable docker
sudo systemctl start docker
# 下载Magicmirror Docker镜像
docker pull bastilimbach/docker-magicmirror
# 创建Magicmirror Docker容器
docker run -d \
--publish 80:8080 \
--restart always \
--volume ~/magic_mirror/config:/opt/magic_mirror/config \
--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
--volume /etc/localtime:/etc/localtime:ro \
--name magic_mirror \
bastilimbach/docker-magicmirror
# 创建项目功能
sudo docker exec -it magic_mirror bash
cd magic_mirror
git clone https://github.com/shbatm/mmm-carousel
npm install
以下开源功能可根据需求任意挑选。
https://github.com/darickc/MMM-BackgroundSlideshow
https://github.com/cbrooker/MMM-Todoist
https://github.com/shbatm/mmm-carousel
https://github.com/BenRoe/MMM-SystemStats
https://github.com/fewieden/MMM-voice
https://github.com/AdamMoses-GitHub/MMM-ImageSlideshow
https://github.com/boazarad/MMM-CountDown
https://github.com/LukeSkywalker92/MMM-Globe
https://github.com/EbenKouao/MMM-SmartTouch
https://github.com/NolanKingdon/MMM-MoonPhase
https://github.com/frdteknikelektro/MMM-SimpleLogo
https://github.com/mykle1/MMM-EARTH
https://github.com/fewieden/MMM-AlarmClock