https://youtu.be/fR5XhHYzUK0
GND → Ground (6)
VCC → 5v ( 2)
SDA → GPIO2
SCL → GPIO3
I2C Enable
sudo raspi-config
Advanced option > I2C > Enable
Install smbuns and i2c-tools
sudo apt-get update
sudo apt-get install -y python-smbus i2c-tools
Checking if I2c is enabled.
lsmod | grep i2c_
Checking I2C address
sudo i2cdetect -y 1
I2C address from following example is 0x3f, this I2C address is important.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
wget https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/lcd_i2c.py
sudo nano lcd_i2c.py
Change I2C address to "0x3f" if it needs to be adjusted.
#Define some device parameters
I2C_ADDR = 0x3f # I2C device address
'Computer > Linux' 카테고리의 다른 글
라즈베리파이 Servo motor SG90 (0) | 2019.02.07 |
---|---|
WAVESHARE e-paper display (0) | 2019.02.07 |
Transmission (0) | 2019.02.07 |
Wifi access point 2개 저장하기 (0) | 2019.02.07 |
라즈베리파이 최초 SD 카드 작성 후 SSh 접속 (0) | 2019.02.07 |
라즈베리파이 2대로 웹서버 사용, IP는 하나 (0) | 2019.02.07 |
아파치서버 포트 변경 (0) | 2019.02.07 |
라즈베리파이 웹스트리밍 Motion + VLC (1) | 2019.02.07 |