当前位置:网站首页>智能垃圾桶(五)——点亮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
边栏推荐
- 亚马逊云科技 Community Builder 申请窗口开启
- 一文看懂:数据指标体系的4大类型
- Interview summary of large factories
- 远程办公对我们的各方面影响心得 | 社区征文
- A week of short video platform 30W exposure, small magic push helps physical businesses turn losses into profits
- 【Leetcode】14. Longest Common Prefix
- Tech Talk 活动预告 | 基于Amazon KVS打造智能视觉产品
- 2、 Expansion of mock platform
- [cloud native] briefly talk about the understanding of flume, a massive data collection component
- Talk about an experience of job hopping and being rejected
猜你喜欢

Configure ARP table entry restrictions and port security based on the interface (restrict users' private access to fool switches or illegal host access)

The macrogenome microbiome knowledge you want is all here (2022.7)

Green bamboo biological sprint Hong Kong stocks: loss of more than 500million during the year, tiger medicine and Beijing Yizhuang are shareholders

Tech talk activity preview | building intelligent visual products based on Amazon kVs

对接保时捷及3PL EDI案例
![John blasting appears using default input encoding: UTF-8 loaded 1 password hash (bcrypt [blowfish 32/64 x3])](/img/4c/ddf7f8085257d0eb8766dbec251345.png)
John blasting appears using default input encoding: UTF-8 loaded 1 password hash (bcrypt [blowfish 32/64 x3])
![[error record] the connection of the flutter device shows loading (disconnect | delete the shuttle/bin/cache/lockfile file)](/img/3f/79dcfcd88d779a5d493b4b539bd448.jpg)
[error record] the connection of the flutter device shows loading (disconnect | delete the shuttle/bin/cache/lockfile file)

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

【云原生】简单谈谈海量数据采集组件Flume的理解

绿竹生物冲刺港股:年期内亏损超5亿 泰格医药与北京亦庄是股东
随机推荐
Role and function of uboot
LeetCode 1. Sum of two numbers
John blasting appears using default input encoding: UTF-8 loaded 1 password hash (bcrypt [blowfish 32/64 x3])
System Verilog implements priority arbiter
OpenHarmony如何启动远程设备的FA
2、 Expansion of mock platform
国内比较好的OJ平台[通俗易懂]
Changwan group rushed to Hong Kong stocks: the annual revenue was 289million, and Liu Hui had 53.46% voting rights
【Leetcode】13. 罗马数字转整数
PhD battle-11 preview | review and prospect backdoor attack and defense of neural network
亚马逊云科技 Community Builder 申请窗口开启
Seal Library - installation and introduction
pwm呼吸燈
What is generics- Introduction to generics
ThreadLocal
IP地址转换地址段
绿竹生物冲刺港股:年期内亏损超5亿 泰格医药与北京亦庄是股东
2322. 从树中删除边的最小分数(异或和&模拟)
串口控制舵机转动
Serial port controls steering gear rotation