Difference between revisions of "LCD display + Raspberry Pi"
Jump to navigation
Jump to search
Line 21: | Line 21: | ||
*Copy the Adafruit_CharLCD.py file into chosen directory | *Copy the Adafruit_CharLCD.py file into chosen directory | ||
**pi@raspberrypi ~/Desktop/ChosenDirectory $ cp Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCD/Adafruit_CharLCD.py . | **pi@raspberrypi ~/Desktop/ChosenDirectory $ cp Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCD/Adafruit_CharLCD.py . | ||
+ | |||
+ | *In a text editor copy the following code to test the LCD | ||
[[Category:HowTos]] | [[Category:HowTos]] |
Revision as of 15:44, 1 May 2017
Hardware
- Raspberry pi 3
- 16x2 LCD backlight display for raspberry pi
- 0.1" Header strip
- Breadboard
- 10k potentiometer
- Jumper Wires
Wire setup
- Solder the 0.1" header strip into the 16 pins of the LCD screen's board
- Connect the wires as shown above
- Pin 2 and 6 on raspberry pi to power and ground respectively
- On LCD pin 1 to ground, pin 2 to power, pin 3 to center of potentiometer, pin 4 to GPIO 25, pin 5 to ground, pin 6 to GPIO 24, pin 11 to GPIO 23, pin 12 to GPIO 17, pin 13 to GPIO 21, pin 14 to GPIO 22, pin 15 to power, pin 16 to ground
Software
- Download git to clone libraries
- pi@raspberrypi $ sudo apt get update
- pi@raspberrypi $ sudo apt-get upgrade
- pi@raspberrypi $ sudo apt-get install -y git dialog
- Clone Adafruit's Char_LCD library
- pi@raspberrypi $ git clone https://github.com/adafruit/Adafruit_Python_CharLCD
- Copy the Adafruit_CharLCD.py file into chosen directory
- pi@raspberrypi ~/Desktop/ChosenDirectory $ cp Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCD/Adafruit_CharLCD.py .
- In a text editor copy the following code to test the LCD