Hardware Reference
In-Depth Information
1. After logging into your Pi and running startx , open an LXTerminal window,
type the following line and press Enter:
sudo apt-get update
After you have checked that all your application packages are up to date, type the
following line and press Enter:
sudo apt-get install git
his command checks that the git application that allows you to make a copy of
this open source code is already installed on your Raspberry Pi. It should already
be installed as part of the Raspbian operating system but, if it is not, this com-
mand will download and install it. Once the git application is installed, you can
make a copy of the Adafruit Raspberry Pi Python iles that I've modiied, by typ-
ing:
git clone https://github.com/MissPhilbin/Adventure_9.git
2. After the code is copied, navigate to the directory or folder containing the
Python code for a 16x2 LCD screen by typing the following into the command
line of the LXTerminal and pressing Enter:
cd Adventure_9
3. Now run the Python code by typing the following command and then pressing
Enter (Figure 9-4):
sudo python3 Adafruit_CharLCD.py
You should see the following appear on your LCD screen:
This is a test!
4. As you twist the potentiometer back and forth, the letters will fade and become
more vibrant.
5. Next, copy the iles into your Documents directory where you will be saving
your jukebox Python program by typing:
cp Adafruit_CharLCD.py /home/pi/Documents/
Later in this project you will use these iles to help you write a program that displays
MP3 track information onto the LCD screen of your jukebox.
Search WWH ::




Custom Search