Thursday, June 30, 2016

[RPI GPIO] LCD 16x2 Test

30 June 2016

LCD 16x2 Test on Raspberry Pi 2 (Python GPIO)

1. Enable I2C
- sudo raspi-config
- select 8 Advanced Options
- select A7 I2C
enable?
- yes

by default?
- yes

reboot for saving all changes
sudo reboot

2. Edit loaded modules
sudo nano /etc/modules

add lines:
i2c-bcm2708
i2c-dev

3. Install utilities/software
sudo apt-get update
sudo apt-get install -y python-smbus i2c-tools

reboot for saving all changes
sudo reboot


4. Connect RPI - I2C - LCD 16x2
RPI pin 1 - VCC
RPI pin 3 - SDA
RPI pin 4 - GND
RPI pin 5 - SCL

5. Send python script to RPI


6. Test Run
sudo python lcd.py


Note:
- cek if running i2c module or not?
lsmod | grep i2c_


Referensi
-http://www.raspberrypi-spy.co.uk/2014/11/enabling-the-i2c-interface-on-the-raspberry-pi/
-http://www.raspberrypi-spy.co.uk/2015/05/using-an-i2c-enabled-lcd-screen-with-the-raspberry-pi/

No comments:

Post a Comment