当前位置:网站首页>智能垃圾桶(五)——点亮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
边栏推荐
- Analysis of how to prevent virus in industrial computer
- L'explosion de John utilise l'encodage d'entrée par défaut: UTF - 8 Loaded 1 password Hash (bcrypt [blowfish 32 / 64 X3])
- PWM breathing lamp
- Rock PI Development Notes (II): start with rock PI 4B plus (based on Ruixing micro rk3399) board and make system operation
- Ap和F107数据来源及处理
- PhD Debate-11 预告 | 回顾与展望神经网络的后门攻击与防御
- 超卓航科上市:募资9亿市值超60亿 成襄阳首家科创板企业
- Machine learning perceptron model
- 配置基于接口的ARP表项限制和端口安全(限制用户私自接入傻瓜交换机或非法主机接入)
- Linux Installation PostgreSQL + Patroni cluster problem
猜你喜欢

使用知行之桥的API端口,提供资源供合作伙伴访问

The computer comes with software to make the background color of the picture transparent (matting white background)

【征文活动】亲爱的开发者,RT-Thread社区喊你投稿啦

数字IC手撕代码--投票表决器

TCP congestion control details | 2 background

绿竹生物冲刺港股:年期内亏损超5亿 泰格医药与北京亦庄是股东

相信自己,这次一把搞定JVM面试

Leetcode1380: lucky numbers in matrix

OpenPose的使用

剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
随机推荐
Linux Installation PostgreSQL + Patroni cluster problem
宝宝巴士创业板IPO被终止:曾拟募资18亿 唐光宇控制47%股权
vscode设置删除行快捷键[通俗易懂]
移动应用性能工具探索之路
酒仙网IPO被终止:曾拟募资10亿 红杉与东方富海是股东
[error record] error -32000 received from application: there are no running service protocol
畅玩集团冲刺港股:年营收2.89亿 刘辉有53.46%投票权
你想要的宏基因组-微生物组知识全在这(2022.7)
二、mock平台的扩展
MOSFET器件手册关键参数解读
john爆破出現Using default input encoding: UTF-8 Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
John blasting appears using default input encoding: UTF-8 loaded 1 password hash (bcrypt [blowfish 32/64 x3])
Notice on holding a salon for young editors of scientific and Technological Journals -- the abilities and promotion strategies that young editors should have in the new era
PWM breathing lamp
Talk about an experience of job hopping and being rejected
linux安装postgresql + patroni 集群问题
Fuyuan medicine is listed on the Shanghai Stock Exchange: the market value is 10.5 billion, and Hu Baifan is worth more than 4billion
lsf基础命令
R及RStudio下载安装教程(超详细)
Geoserver: publishing PostGIS data sources