Raspberry Pi 5110 Mini LCD 84*48 PCD8544 Usage
- 1 Introduction
- 2 For C User
- 3 For Python User
- 4 Resource
With a resolution of 84 * 48, this Mini LCD screen display the CPU utilization and the memory occupancy rate that runs on your Raspberry Pi through Raspberry Pi internal Python programming. It is clear at a glance.
Of course, geek players can also program by themselves to display any content. this Mini LCD screen is with backlit. When the Raspberry Pi is used as a server, you can also see the operation condition of Raspberry Pi at night.
Mini LCD screen is compatible with Raspberry Pi Model B+ and B.
For C User
If you are a C user, please test and use PCD8544 LCD according to the following steps:
Step1: Install wiringPi
cd /home git clone git://git.drogon.net/wiringPi cd wiringPi sudo ./build
Step 2: Copy Cpu_show.tar.gz to /home and extract it
Download the Cpu_show.tar.gz and then unzip it
sudo cp yourpath/Cpu_show.tar.gz /home sudo tar xvf Cpu_show.tar.gz
Step 3: Compile files
cd /home/cpu_show sudo ./compile.sh
Step 4: Run the program
Due to the contrast of each LCD are different, if you found the content displayed too dark or too light, you need to modify the contrast variables of pcd8544_rpi.c, and then recompile and run to see the effect of changes !
Modify the line 52, int contrast = 45;
45 is the default contrast, if the character LCD display is too light, set this value increases, decreases if the character LCD display is too dark. Recommended stepping value is 5. After the changes are complete, re-compile the code, and then run.
For Python User
If you are a Python user, please test PCD8544 LCD according to the following steps:
Step 1: Download example code
git clone https://github.com/adafruit/Adafruit_Nokia_LCD.git
Step 2: Configure the base environment
cd Adafruit_Nokia_LCD sudo apt-get install python-dev sudo python setup.py install sudo apt-get install python-imaging
Step 3: Modify example code
Since our PCD8544 LCD display does not use the hardware SPI interface of Raspberry Pi, so we use software to simulate SPI so as to drive PCD8544. The example code is based on hardware SPI. As a result, we need to make a few modifications to example code to drive PCD8455 LCD.
Step 4: Run the Python program just modified
sudo python image.py