安装screenfetch:显示系统、主题信息sudo apt install screenfetch screenfetchlinux各发行版logo图片及系统信息sudo apt install linuxlogo linux_logo linux_logo -f -L list sudo apt-get install neofetch neofetch安装会说话的牛sudo apt-get install cowsay然后输入下面进行测试cowsay “我是会说话的牛”只需用 -l参数就能看到它能提供的所有动物。cowsay -l会输出如下人物,你可以通过-f参数加人物名字来更换说话人物:# Cow files in /usr/share/cowsay/cows: apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep ghostbuste
编辑源:sudo nano /etc/apt/sources.list打开以后,将里面的代码用 # 注释掉,添加如下代码:deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpisudo nano /etc/apt/sources.list.d/raspi.list打开以后,将里面的代码用 # 注释掉,添加如下代码:deb http://mirror.tuna
安装MySQL安装MySQL使用管理员权限运行apt-get获取最新的MySQL及Python编程接口(之后用于数据库编程):sudo apt-get install mariadb-server-10.0 python-mysqldb 配置MySQL可以远程连接sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf 找到并注释掉下面的内容bind-address = 127.0.0.1修改root密码sudo mysqladmin -u root -p password 填写密码Enter password: 我安装的这个版本安装时没有设置root密码的提示,这个随便输 New password: 填你的密码 Confirm new password:开启root远程登录权限sudo mysql #超级用户进入mysql 切换到数据库MySQLuse mysql;给root授予在任意主机(%)访问任意数据库的所有权限grant all privileges on *.* to 'root'@'%'
使用1602转接板需要先开启IICsudo raspi-config选择第五个 进去后选择I2C然后点是查看自己的I2C地址ls /dev/i2c-*可能会返回/dev/i2c-1记住这个1sudo i2cdetect -y 1如果说找不到命令,就需要安装I2C-toolssudo apt-get install i2c-tools python-smbus记录一下地址在一个目录下写如LCD1602的包#!/usr/bin/env python import time import smbus BUS = smbus.SMBus(1) def write_word(addr, data): global BLEN temp = data if BLEN == 1: temp |= 0x08 else: temp &= 0xF7 BUS.write_byte(addr ,temp) def send_command(comm): # Send bit7-4 firstly buf = co
所需要组件树莓派SD卡RC522 RFID组装RFID RC522SDA(串行数据信号),SCK(串行时钟),MOSI(主出从入),MISO(主入从出),IRQ(中断请求),GND(地面电源),RST(复位电路)和3.3V(3.3V电源输入)SDA连接到引脚24`。SCK连接到引脚23。MOSI连接到引脚19。MISO连接到引脚21。GND连接到引脚6。RST连接到引脚22。3.3v连接到引脚1。
进入 MySQLsudo mysql -u root -p mysqlsudo mysql use mysql退出MySQLexit;清屏CTRL+L:进行清屏
一只胖橘