树莓派使用小记
来源:互联网 发布:中文数据库有哪些 编辑:程序博客网 时间:2024/05/20 00:53
安装系统
烧录镜像,略
设置静态IP
$ sudo nano /etc/dhcpcd.conf
增加:
interface eth0
static ip_address=192.168.0.33/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1interface wlan0
static ip_address=192.168.0.3/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
增加:
network={
ssid=”BZZWAN”
psk=”bigzhizhixxoo”
key_mgmt=WPA-PSK
}
安装中文支持
安装中文字体
$ sudo apt-get install ttf-wqy-zenhei
安装拼音输入法
$ sudo apt-get install scim-pinyin
进入菜单配置
$ sudo raspi-config
选择change_locale,在Default locale for the system environment:中选择zh_CN.UTF-8
命令行修改别名
$ vi ~/.bashrc
增加:
alias ll=’ls -l’
修改软件源
- 查找找到最新的软件源镜像:
http://www.raspbian.org/RaspbianMirrors, - 修改/etc/apt/sources.list
$ cd /etc/apt
# 备份
$ cp sources.list sources.list_back
# 修改
$ sudo nano sources.list - 更新软件源和软件
# 更新软件源
$ sudo apt-get update
# 更新软件
$ sudo apt-get upgrade
内核模块编译环境
$ uname -a
Linux raspberrypi 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/Linux
$ sudo apt-cache search kernel-headers
kernel-package - utility for building Linux kernel related Debian packages
linux-libc-dev - Linux support headers for userspace development
raspberrypi-kernel-headers - Header files for the Raspberry Pi Linux kernel
$ sudo apt-get install raspberrypi-kernel-headers
将在/usr/src目录下生成两个文件夹linux-headers-4.4.21+ 和 linux-headers-4.4.21-v7+
BCM2835 C Library 安装
$ wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.52.tar.gz
$ tar xvzf bcm2835-1.52.tar.gz
$ cd bcm2835-1.52 $ ./configure $ make $ sudo make check $ sudo make install
wiringPi安装
git clone源码,进入目录后编译并安装
$ git clone git://git.drogon.net/wiringPi$ cd wiringPi$ ./build
读取所有引脚定义
$ gpio readall
WiringPi中的函数类似于Arduino的wiring系统:
https://github.com/WiringProject
重启
$ sudo reboot
- 树莓派使用小记
- 树莓派Raspberry Pi使用小记
- NUnit使用小记!
- Display Tag使用小记
- TreeView使用小记
- Ubuntu使用小记
- VC6使用小记
- junit初步使用小记
- sudo使用小记
- Display Tag使用小记
- autoconf 使用小记
- Display Tag使用小记
- 使用ObjectDataSource 小记
- Display Tag使用小记
- AQtime使用小记
- 优先队列使用小记
- wxStatusBar 使用小记
- JUnit使用小记
- B
- Jeesite移除list-,view-等前缀,方便SEO
- 反转链表,(5)
- PHP中stdClass的意义
- js 的Object.assign(),要慎用
- 树莓派使用小记
- [LeetCode] 526. Beautiful Arrangement
- Rxjava学习
- 新生多校第六场 插塔憋憋乐(数论+贪心)
- bzoj4989 [Usaco2017 Feb]Why Did the Cow Cross the Road(树状数组求逆序对个数)
- CMake+VS2013编译与安装32/64位PCL1.8RC1源码
- css样式之display属性----table和block的区别
- 训练数据的充分性(1):PAC学习保证
- Java