Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iotguider/6076f086b68d59d0944b57849cf92c3e to your computer and use it in GitHub Desktop.
Save iotguider/6076f086b68d59d0944b57849cf92c3e to your computer and use it in GitHub Desktop.
Code for interfacing 16x2 character LCD in Raspberry Pi using python
import time
import Adafruit_CharLCD as LCD
# Raspberry Pi pin setup
rs = 25
en = 24
d4 = 23
d5 = 17
d6 = 18
d7 = 22
backlight = 2
# Define LCD column and row size for 16x2 LCD.
columns = 16
rows = 2
lcd = LCD.Adafruit_CharLCD(rs,en,d4,d5,d6, d7,columns,rows,backlight)
lcd.message('IOTGUIDER.in!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment