树莓派 Raspberry PI基础

树莓派 Raspberry PI基础

官网网址https://www.raspberrypi.org

下载地址:https://www.raspberrypi.org/downloads/

官方系统:RaspBian ,地址https://www.raspberrypi.org/downloads/raspbian/

系统安装工具: Etcher,地址https://etcher.io/

技术文档:https://www.raspberrypi.org/documentation/

安装系统步骤

安装系统镜像文件需要用到读卡器、SD卡以及Etcher软件。

  • 下载Etcher软件并安装

  • 连接读卡器和SD卡

  • 打开Etcher软件,选择需要写入SD卡的系统 Raspberry PI .img或者.zip文件

  • 点击Flash!开始写入系统文件,等待写入完成

开启串口终端SSH

最新版本的RaspBian系统默认串口处于关闭状态,需要在config.txt文件中编辑选择打开串口。

  • 打开SD卡中的config.txt文本文件

  • 在文件末尾加上 enable_uart=1

登陆系统

将SD卡插入模块,上电,等待模块启动完成。选择使用putty软件通过串口连接模块,波特率为115200.

登陆账号:pi 

登陆密码:raspberry

系统配置工具raspi-config

终端运行指令: sudo raspi-config

功能:修改用户密码,网络选项,启动选项,硬件选择开启或者关闭等功能

配置网络

扫描附近网络设备指令

sudo  iwlist  wlan0  scan

添加已知网络

  • 打开网络配置文件wpa-supplicant:

    sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

  • 根据以下格式添加网络名称、密码

    network={ ssid="testing" psk="testingPassword"}

  • 重新配置网络

    wpa_cli  -i  wlan0  reconfigure

  • 查看连接状态

    ifconfig  wlan0

  • 网络其他属性配置

    id_str="school" / id_str="home", 将网络标志位家庭或者学校网络

    priority = 数字,多个网络的连接优先级,数字越大,优先级越高

开启网络终端SSH

  • 通过桌面应用配置

    • Preferences菜单中运行Raspberry Pi Configuration

    • 选择 Interfaces,使能SSH

    • 点击OK完成配置

  • 通过raspi-config工具

    • 终端输入 sudo  raspi-config

    • 选择 Interfacing  options

    • 选择SSH

    • 先后选择YES >> OK >> Finish,设置完成退出

  • 使用 systemctl

    sudo  systmctl  enable ssh

    sudo  systmctl  start  ssh

    选择使用putty软件,指定模块IP地址即可连接树莓派模块。

 

 

 

 

猜你喜欢

转载自www.cnblogs.com/BlogsOfLei/p/9206161.html