Raspberry pi3 入门一

网络

TTL USB转串口 登录服务器

  • 串口线
    微雪 PL2303 USB转TTL USB转串口 PL2303模块 刷机线 4PIN 杜邦线
    USB type A 公口,4PIN 2.54mm接口
    内置PL2303芯片,兼容WIN8系统
    红色:VCC;黑色:GND;绿色:TXD(接外部设备RXD);白色:RXD(接外部设备TXD)
    内置PL2303芯片,兼容WIN8系统

  • 连线
    黑.线:GND 连 引脚6
    白线:RXD 连 引脚8
    绿线:TXD 连 引脚10

  • 解决与蓝牙模块的冲突
    在Raspberry Pi3由于蓝牙模块和串口都使用 UART0, 会造成TTL USB转串口 登录服务器出现乱码,不能正常工作。具体参考:https://openenergymonitor.org/emon/node/12311
    解决办法:禁用蓝牙,把UART0/ttyAMA0 再设定给 GPIOs 14 & 15,具体步骤如下:

1)在/boot/config.txt最后添加如下一行:

dtoverlay=pi3-disable-bt

另外禁掉蓝牙驱动开机自启动

sudo systemctl disable hciuart

2)重启Raspberry Pi3生效。

  • Linux 登录
sudo apt-get install putty

运行putty, 在配置界面选择”Serial”, Serial line ->”/dev/ttyUSS0”, Seepd->”115200”

  • window7下登录
    参考:http://workshop.raspberrypiaustralia.com/usb/ttl/connecting/2014/08/31/01-connecting-to-raspberry-pi-via-usb/
    1) 安装PL2303驱动
    2)在 Device Manager中找到端口号
    3)在 putty和xshell中设置端口号和波特率115200

其他参考

https://www.raspberrypi.com.tw/

http://workshop.raspberrypiaustralia.com/usb/ttl/connecting/2014/08/31/01-connecting-to-raspberry-pi-via-usb/

WiFi

扫描网络, 列出所有的WIFI 的ESSID。

iwlist wlan0 scan |grep ESSID

在如下文件/etc/wpa_supplicant/wpa_supplicant.conf 添加WIFI的ESSID和密码。

ctrl_interface=DIR=/var/run/wpa_suppli
cant GROUP=netdev
update_config=1
country=GB

network={
    ssid=""
    psk=""
    key_mgmt=WPA-PSK
}

重启系统使配置生效。

Bluetooth

待整理

  • https://www.element14.com/community/docs/DOC-81266/l/setting-up-bluetooth-on-the-raspberry-pi-3
  • https://www.maker.io/en/blogs/raspberry-pi-3-how-to-configure-wi-fi-and-bluetooth/03fcd2a252914350938d8c5471cf3b63
  • http://www.techradar.com/how-to/computing/how-to-get-wi-fi-and-bluetooth-working-on-raspberry-pi-3-1316938
  • http://lifehacker.com/everything-you-need-to-set-up-bluetooth-on-the-raspberr-1768482065

更新操作

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update

开机启动

sudo apt-get install daemontools-run
setuidgid turtlebot roslaunch /etc/ros/electric/turtlebot.launch

systemd

  • https://erlerobotics.gitbooks.io/erle-robotics-erle-brain-a-linux-brain-for-drones/content/en/tutorials/systemd.html
  • https://wiki.archlinux.org/index.php/systemd_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

GPIO

Pi3的GPIO引脚如下:
Raspberry pi3 入门一_第1张图片


有用链接

  • pwm
    https://sourceforge.net/p/raspberry-gpio-python/wiki/PWM/
  • 磁盘分区
    http://elinux.org/RPi_Resize_Flash_Partitions

你可能感兴趣的:(Raspberry pi3 入门一)