基于树莓派的智能箱包开发环境搭建

1.换源,更新

1.1编辑软件源文件

# 编辑source.list文件
sudo nano /etc/apt/source.list

替换内容为:

# 清华源
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free

1.2编辑系统更新源文件

# 编辑raspi.list文件
sudo nano /etc/apt/sources.list.d/raspi.list

替换内容为:

# 清华源
deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui

2.安装输入法

sudo apt-get install fcitx fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sunpinyin

安装完毕,重启树莓派

3.安装pybluez

# 克隆项目
git clone https://github.com/karulis/pybluez

# 配置项目
sudo python setup.py build

# 安装plbluez
sudo python setup.py install

4.安装GPS库

# 安装gps相关库
sudo apt-get install gpsd gpsd-clients python-gps

5.安装yagmail

# 安装yagmail
pip install yagmail

6.安装蓝牙驱动与A2DP支持

6.1蓝牙驱动

# 安装蓝牙驱动及配置相关
sudo apt-get install pi-bluetooth bluez bluez-firmware blueman
sudo usermod -G bluetooth -a pi
sudo systemctl start bluetooth
sudo reboot

6.2A2DP支持

# 克隆仓库
git clone https://github.com/bareinhard/super-simple-raspberry-pi-audio-receiver-install

# 打开对应目录
cd super-simple-raspberry-pi-audio-receiver-install

# 切换分支
git checkout stretch-fix

# 执行安装脚本
sudo ./install.sh

  1. Car和Home,我选的Home
  2. Device name和AirPlay Device Name,写PiMusic
  3. 密码,不输入
  4. Do you want all the Devices to use the same name? (y/n) : Choose y or n,选n
  5. Which Sound Card are you using? (0/1/2/3/4/5/6/7/8/9/10/11),写0

7.安装Webiopi

# 克隆仓库
git clone https://github.com/thortex/rpi3-webiopi

# 打开对应目录
cd rpi3-webiopi/webiopi_0.7.1

# 执行配置脚本
sudo ./setup.sh

# 修改密码
sudo webiopi-passwd

# 启动webiopi
sudo webiopi 8000

# 让webopio后台运行,否则按ctarl+c就会断掉
sudo /etc/init.d/webiopi start

# 设置webopio随系统启动
sudo update-rc.d webiopi defaults
登陆网址用户名默认密码
树莓派IP:8000webiopiraspberry

文章作者:GentleTK
原文链接:https://gentletk.gitee.io/基于树莓派的智能箱包开发环境搭建

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

GentleTK

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

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

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

打赏作者

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

抵扣说明:

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

余额充值