docs(i2c.py): 更新readme和添加requirements文件

更新readme中的依赖安装说明,改用requirements.txt统一管理依赖
添加requirements.txt文件列出项目所需依赖
This commit is contained in:
cnphpbb
2025-08-29 22:19:44 +08:00
parent 776bdbd3df
commit 2f28eb0d23
2 changed files with 7 additions and 2 deletions

View File

@@ -10,9 +10,10 @@ apt install -y python3-pip python3-pil python3-libgpiod
cd i2c.py cd i2c.py
python3 -m venv .venv python3 -m venv .venv
source .venv/bin/activate source .venv/bin/activate
pip3 install adafruit-circuitpython-ssd1306 # 使用 requirements.txt 安装所有依赖
pip3 install -r requirements.txt
## 系统依赖 ## 系统依赖
pip3 install adafruit-circuitpython-ssd1306 --break-system-packages pip3 install -r requirements.txt --break-system-packages
``` ```
2. 调试 2. 调试

4
i2c.py/requirements.txt Normal file
View File

@@ -0,0 +1,4 @@
# Python dependencies for i2c.py project
adafruit-circuitpython-ssd1306
adafruit-blinka
Pillow