树莓派魔镜

下载node.js

sudo apt-get install nodejs

下载npm

sudo apt-get install npm

安装node.js

curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -

sudo apt install -y nodejs

更新库文件

sudo apt-get update

更新软件

sudo apt-get upgrade

手动安装魔镜,首先克隆库

git clone https://github.com/MichMich/MagicMirror

进入存储库

cd MagicMirror/

安装应用程序(时间较长,根据树莓派版本时间长短不同,不要打断)

npm install
# 国内用户建议用下面安装
npm install --registry=https://registry.npm.taobao.org --loglevel=silly

有时因为网络原因,导致一些组件下载失败,在npm install的时候,如果中途退出或者出错,最好将node_modules文件夹删掉,重新执行npm install
复制配置示例文件

cp config/config.js.sample config/config.js

启动应用程序

npm run start     

或服务器启动(网页)

npm run server

另外有魔镜安装一键脚本(适用网络好的)

bash -c   " $( curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh ) "

在这里插入图片描述
一键脚本显示这样才是正在安装,不显示建议按照上述步骤手动安装

旋转屏幕

修改启动配置文件

sudo nano /boot/config.txt

添加以下的某一行:

display_rotate=0 不旋转 Normal

display_rotate=1 转90 degrees

display_rotate=2 转180 degrees

display_rotate=3 转270 degrees

display_rotate=0x10000 左右翻转horizontal flip

display_rotate=0x20000 上下翻转vertical flip

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

牛 

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

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

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

打赏作者

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

抵扣说明:

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

余额充值