![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树莓派
羞羞的铁脚
王雪涛
展开
-
树莓派下配置PHP+Nginx+Mysql
1 安装配置Mysql树莓派4安装mysql_羞羞的铁脚的博客-CSDN博客2 安装nginxsudo apt install nginx配置网站的配置信息sudo nano /etc/nginx/sites-available/default增加或修改配置添加index.phplocation ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.原创 2022-05-03 09:27:42 · 673 阅读 · 0 评论 -
关于树莓派4的I2C接口
关于树莓派的I2C接口树莓派的接口图上有两个I2C接口标记为:1,(SDA1-SCL1) 对应的CPU的GPIO是GPIO2和GPIO3,对应的i2c系统标记为i2c-12,(ID_SD-ID_SC)对应的CPU的GPIO是GPIO0和GPIO1,这个接口默认连接了CSI0和DSI0 摄像头和显示屏。对用的I2C标记为是i2c-0,在CM4的核心板上原理图上ID_SD-ID_SC 标记位SDA1 和SCL1 不要把它和第1条的(SDA1-SCL1)搞混了3在CPU 上还有两个注意的CPU上原创 2022-04-28 14:07:31 · 4010 阅读 · 1 评论 -
树莓派使用hostapd设置热点并使用python切换热点和wifi
设置方法https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.mdfrom flask import Flaskfrom flask import requestimport osapp = Flask(__name__)#通过修改dhcpcd.conf启用热点@app.route('/setap', methods=['post', 'get'])...原创 2021-04-06 16:30:39 · 1024 阅读 · 0 评论 -
树莓派4使用2-5号串口
树莓派4 有6个串口 默认 2-4是未启动的使用串口2-4 需要在/boot/config.txt 使用dtoverlay来加载设备引脚的定义为例如使用串口2的步骤是1 在/boot/config.txt 添加 dtoverlay=uart2重新启动在/dev目录下发现新的串口 /dev/ttyAMA12 使用/dev/ttyAMA1来调用其他串口也是如此...原创 2021-03-16 17:24:48 · 663 阅读 · 0 评论 -
树莓派zero 使用usb 连接登陆
1 下载树莓派系统raspios-buster-armhf-lite 安装https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit2 在win10 下烧录完成系统后出现boot分区,修改config.txt 和cmdline.txt 在config.txt下添加dtoverlay=dwc2 ,让系统加载usb 控制器驱动cmdline.txt 的rootwait后面下添加 mod...原创 2021-03-16 15:49:52 · 2156 阅读 · 0 评论 -
树莓派4使用DS3231 RTC时钟
1 配置方式1插入ds3231(1)使用sudo raspi-config启用i2c 接口此时使用i2cdetect -y 1 查看i2c设备(2)修改 /boot/config.txt 末尾添加dtoverlay=i2c-rtc,ds3231从其后再=使用i2cdetect -y 1 查看ic设备68位置变成UU 表示系统驱动使 用了这个位置 (3) 禁用fake-hwclock (非必须)sudo systemctl disable fake-hwclock(4) 修改/l原创 2021-02-26 10:15:59 · 1729 阅读 · 0 评论 -
Raspberry 树莓派安装pyshark
1 安装sudo apt-get install tshark# allow user pi to use tshark without sudo # logout/in required!sudo usermod -a -G wireshark pisudo apt-get install libxml2-devsudo apt-get install libxslt-devsudo pip3 install pyshark原创 2020-11-13 15:24:51 · 336 阅读 · 0 评论 -
树莓派串口与Arduino通信
Python 端程序:python的串口write函数要求的格式是bytes和bytearray错误的用法: 期待发送字节0x01 s.write(0x01) 在python中0x01是int类型 s.write(1)正确的用法:s.write([0x01])s.write(six.int2byte(1))s.write(bytes([0x...原创 2019-12-25 11:24:20 · 256 阅读 · 0 评论 -
树莓派使用docker入门
树莓派使用docker本文翻译自https://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/仅翻译了部分内容,在树莓派3b+上进行的试验。在树莓派上安装docker使用基本教程http://shumeipai.nxez....翻译 2019-12-17 08:46:04 · 1027 阅读 · 0 评论 -
树莓派读取4*4键盘
#!/usr/bin/pythonimport RPi.GPIO as GPIOimport wiringpi as htimeclass keypad(): def __init__(self, columnCount=3): GPIO.setmode(GPIO.BOARD) # CONSTANTS if co...翻译 2019-11-01 10:18:19 · 1106 阅读 · 0 评论 -
树莓派3B+ I2C总线挂接多个设备
树莓派3B+ I2C接口的使用1 开启树莓派i2c 再Raspberry Pi Configuration 的Interfaces 下I2C 选择enable 即可2 将I2C 设备连接到树莓派 如下图:3 代开console 输入 i2cdetect -y 1 ,注意此处...原创 2019-08-09 16:43:19 · 8190 阅读 · 6 评论