当前位置:网站首页>智能垃圾桶(五)——点亮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
边栏推荐
- What is normal distribution? What is the 28 law?
- Just a coincidence? The mysterious technology of apple ios16 is even consistent with the products of Chinese enterprises five years ago!
- 上传代码到远程仓库报错error: remote origin already exists.
- 基于Impala的高性能数仓实践之执行引擎模块
- IP address translation address segment
- The computer comes with software to make the background color of the picture transparent (matting white background)
- A few lines of code to complete RPC service registration and discovery
- In MySQL and Oracle, the boundary and range of between and precautions when querying the date
- 剑指 Offer 22. 链表中倒数第k个节点
- Rock PI Development Notes (II): start with rock PI 4B plus (based on Ruixing micro rk3399) board and make system operation
猜你喜欢

A week of short video platform 30W exposure, small magic push helps physical businesses turn losses into profits

Leetcode1380: lucky numbers in matrix

Geoserver: publishing PostGIS data sources
![[cloud native] briefly talk about the understanding of flume, a massive data collection component](/img/2d/8c4769e97fb84e98eafb7069551341.png)
[cloud native] briefly talk about the understanding of flume, a massive data collection component

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

剑指 Offer 26. 树的子结构

Exploration and practice of integration of streaming and wholesale in jd.com

Executive engine module of high performance data warehouse practice based on Impala

PhD Debate-11 预告 | 回顾与展望神经网络的后门攻击与防御

Hard core! One configuration center for 8 classes!
随机推荐
Deep learning image data automatic annotation [easy to understand]
绿竹生物冲刺港股:年期内亏损超5亿 泰格医药与北京亦庄是股东
pwm呼吸灯
What is normal distribution? What is the 28 law?
[error record] error -32000 received from application: there are no running service protocol
剑指 Offer 24. 反转链表
C语言自定义函数的方法
深度学习图像数据自动标注[通俗易懂]
System Verilog implements priority arbiter
DGraph: 大规模动态图数据集
LeetCode 2. Add two numbers
What will you do after digital IC Verification?
L'explosion de John utilise l'encodage d'entrée par défaut: UTF - 8 Loaded 1 password Hash (bcrypt [blowfish 32 / 64 X3])
A week of short video platform 30W exposure, small magic push helps physical businesses turn losses into profits
綠竹生物沖刺港股:年期內虧損超5億 泰格醫藥與北京亦莊是股東
Tech talk activity preview | building intelligent visual products based on Amazon kVs
大廠面試總結大全
The impact of telecommuting on all aspects of our experience | community essay solicitation
LeetCode 4. Find the median (hard) of two positive arrays
js删除字符串中的子串