当前位置:网站首页>智能垃圾桶(五)——点亮OLED
智能垃圾桶(五)——点亮OLED
2022-07-02 14:26:00 【光追雨】
一、连接方式
SDA:3号引脚
SCL:5号引脚
GND:14号引脚
VCC:1号引脚
二、环境准备
2.1 打开I2C模式
$ sudo apt-get install -y python-smbus
$ sudo apt-get install -y i2c-tools
$ sudo raspi-config
之后打开I2C模式
2.2 安装 OLED 屏的 Python 库
$ git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
sudo python -m pip install --upgrade pip setuptools wheel
sudo apt-get remove python-pip python3-pip
sudo apt-get install python-pip python3-pip
安装 PIL 库,有一些图片处理的程序会用到这个。
sudo apt-get install python-pil python3-pil
使用 pip 安装 Adafruit-SSD1306 库。
sudo pip3 install Adafruit_GPIO
sudo pip3 install Adafruit_SSD1306
sudo pip3 install Adafruit_BBIO
进入目录
cd ~/Adafruit_Python_SSD1306/examples/
三、运行效果
sudo python3 stats.py
sudo python3 image.py
边栏推荐
- <四> H264解码输出yuv文件
- 上传代码到远程仓库报错error: remote origin already exists.
- vscode设置删除行快捷键[通俗易懂]
- pwm呼吸燈
- P6774 [noi2020] tears in the era (block)
- Privacy computing technology innovation and industry practice seminar: Learning
- [fluent] dart data type list set type (define set | initialize | generic usage | add elements after initialization | set generation function | set traversal)
- 伟立控股港交所上市:市值5亿港元 为湖北贡献一个IPO
- 酒仙网IPO被终止:曾拟募资10亿 红杉与东方富海是股东
- Kubernetes three open interfaces first sight
猜你喜欢
The poor family once again gave birth to a noble son: Jiangxi poor county got the provincial number one, what did you do right?
Tech talk activity preview | building intelligent visual products based on Amazon kVs
In MySQL and Oracle, the boundary and range of between and precautions when querying the date
剑指 Offer 25. 合并两个排序的链表
大廠面試總結大全
Serial port controls steering gear rotation
易语言abcd排序
剑指 Offer 26. 树的子结构
[cloud native] briefly talk about the understanding of flume, a massive data collection component
伟立控股港交所上市:市值5亿港元 为湖北贡献一个IPO
随机推荐
R and rstudio download and installation tutorial (super detailed)
System Verilog implements priority arbiter
Rock PI Development Notes (II): start with rock PI 4B plus (based on Ruixing micro rk3399) board and make system operation
寒门再出贵子:江西穷县考出了省状元,做对了什么?
Easy language ABCD sort
LeetCode 1. Sum of two numbers
Fuyuan medicine is listed on the Shanghai Stock Exchange: the market value is 10.5 billion, and Hu Baifan is worth more than 4billion
Usage of sprintf() function in C language
有赞和腾讯云、阿里云一同摘得“中国企业云科技服务商50强”[通俗易懂]
Interpretation of key parameters in MOSFET device manual
lsf基础命令
LeetCode 6. Zigzag transformation (n-shaped transformation)
綠竹生物沖刺港股:年期內虧損超5億 泰格醫藥與北京亦莊是股東
Believe in yourself and finish the JVM interview this time
The impact of telecommuting on all aspects of our experience | community essay solicitation
How openharmony starts FA of remote devices
TCP congestion control details | 2 background
相信自己,这次一把搞定JVM面试
关于举办科技期刊青年编辑沙龙——新时代青年编辑应具备的能力及提升策略的通知...
易语言abcd排序