20X4 LCD MODULE I2C serial 1. GENERAL INFORMATION Dear customer, Thank you for purchasing our product. In the following, we will show you which things should be noted during the use. Should you encounter any unexpected problems, do not hesitate to contact us. www.joy-it.net Pascalstr.
. USE WITH AN ARDUINO Connecting the display Connect the display to the pins of your Arduino like shown in the picture or rather in the chart. This picture was made in Fritzing. Arduino® Uno 20 x 4 LCD GND GND 5V VCC SDA SDA SCL SCL www.joy-it.net Pascalstr.
Installation of the library Before you can transfer the code example to your Arduino, you must install first the additional library LiquidCrystal_I2C. This library allows you an easy and fast usage of the display. Therefore, open the library manager on your Arduino software. Search now in the library manager for the LiquidCrystal_I2C library and install it. www.joy-it.net Pascalstr.
As soon as the library is installed, the installation of the display is finished. You can now transfer the code example which is described in the next step and test the display. Code example In the following, you can use the code example to test the usage with your display. Copy this example completely on your Arduino. Because of the different hardware addresses of the display, you must use the right address in the code.
3. USAGE OF THE RASPBERRY PI Installation of the software Should you already have the latest Raspbian system on your Raspberry Pi, you can skip this step and you can continue with the next step. Install on your SD card the latest Raspbian with the help of the Win32Disk-Imager which you can find with the following link. Connecting the display Connect the display to the pins of your Raspberry Pi like shown in the picture or rather in the chart. This picture was made in Fritzing. www.joy-it.
Raspberry Pi 20 x 4 LCD Pin 6 (Ground) GND Pin 4 (5 V) VCC Pin 3 (BCM 2 / SDA) SDA Pin 5 (BCM 3 / SCL) SCL Installation of the libraries As soon as the installation is finished and teh system is restarted, open the terminal and perform the following commands: sudo sudo sudo sudo apt-get install python-pip python-dev build-essential pip install RPi.
Here choose and activate I2C. Afterwards, you must add the according enry into the module file. Therefore, open the module file: sudo nano /etc/modules Add the following two lines at the end o the file: i2c-bcm2708 i2c-dev Save now the filw with the key combination CTRL + O. After that you can leave the editor with CTRL+ X . Restart now your Raspberry Pi with the following command: sudo reboot Now, we can download the LCD driver.
The output will show the following: 00: 10: 20: 30: 40: 50: 60: 70: 0 1 2 -------- -------- -------- 3 --------- 4 --------- 5 --------- 6 --------- 7 --27 ------ 8 -------- 9 -------- a -------- b -------- c -------- d -------- e -------- f -------- The just started test has recognized the I2C signal at the address 27. This is the standard address of the display. But it also can be found at another saving address.
The text within the command lcd.lcd_display_string will be shown on the display. The number behind the text issues the line in which the text will be shown in. The text can be of course modified to your desires. The editor can be left with the fundamental key combination. import lcddriver from time import * lcd = lcddriver.lcd() lcd.lcd_clear() try: while True: lcd.lcd_display_string(" joy-IT", 1) lcd.lcd_display_string("", 2) lcd.lcd_display_string(" I2C Serial", 3) lcd.
4. OTHER INFORMATION PR Our Information and Take-back Obligations according to the Electrical and Electronic Equipment Act (ElektroG) Symbol on Electrial and Electronic Products: This crossed-out bin means that electrical and electronic products do not belong into the household waste. You must hand over your old appliance to a registration place. Before you can hand over the old appliance, you must remove used batteries and replacement batteries which are not enclosed by the device.