Template: LCD1602 RGB Module Guides for Pi

From Waveshare Wiki
Jump to: navigation, search

Hardware Configuration

Enable I2C interface

  • Open terminal, use command to enter the configuration page
sudo raspi-config
Choose Interfacing Options -> I2C -> Yes  to enable I2C interface

RPI open i2c.png

And then reboot the system:

sudo reboot

Hardware Connection

You can directly attach it to the 40PIN GPIO of Raspberry Pi. Or you can wire it to Raspberry Pi with PH2.0 4PIN interface of the Module, please refer to the Pin definition below:

LCD Raspberry Pi
BCM2835 Board
VCC 5V 5V
GND GND GND
SDA SDA.1 3
SCL SCL.1 5

Take the LCD1602 RGB Module as an example, just connect it to the Raspberry Pi. The color of actual cable may be different with the figure here, please connect them according to the pins instead of color.

LCD1602 RGB Module007.jpg

If you are using Jetson nano, the connection should as bellow:

LCD1602 RGB Module012.jpg

Download the demo

Open the terminal of the Raspberry Pi, execute command to download demo codes:

cd ~
wget https://www.waveshare.com/wiki/File:LCD1602-RGB-Module-demo.zip
cd ~/LCD1602-RGB-Module-demo/Raspberry
sudo chmod 777 *
sudo python Choose_Color.py 
sudo python Discoloration.py