Raspi related librairies & tools
You can found a copy of this software here: https://github.com/ronanguilloux/Raspberry-Pi-Utils
A simple PCD8544 LCD (Nokia3310/5110) driver. Target board is Raspberry Pi. This driver uses 5 GPIOs on target board with a bit-bang SPI implementation (hence, may not be as fast but seems fast enough). The pcd8544_cli tool, to be compiled, allow you to display messages freely on the display. Makes use of WiringPI-library of Gordon Henderson (https://projects.drogon.net/raspberry-pi/wiringpi/)
Image source & inspiration: http://binerry.de/post/25787954149/pcd8544-library-for-raspberry-pi
This makes use of WiringPI-library of Gordon Henderson - so the WiringPI-library is required to be installed.
The PCD8544 file is a library, the pcd8544_cli is a cli-tool example, to be extended by you. Since gcc is installed on Raspberry Pi images, you can easily build them:
$ cc -o pcd8544_cli pcd8544_cli.c PCD8544.c -L/usr/local/lib -lwiringPi
Usage:
pcd8544_cli [options] <text to display>
Available options:
- -h: show this help on usage & options
- -i: show IP address
- -d: show datetime
Print help informations in the terminal (will reset the display)
$ sudo ./pcd8544_cli -h
Example 1: Print "Foooooooooooooooooooooooooo" on the display:
$ sudo ./pcd8544_cli "Foooooooooooooooooooooooooo"
Example 2: Print current IP address on the display:
$ sudo ./pcd8544_cli -i
Example 3: Print current datetime on the display:
$ sudo ./pcd8544_cli -d
PCD8544.c & PCD8544.h are copyright (C) 2010 Limor Fried, Adafruit Industries
CORTEX-M3 version by Le Dang Dung, 2011 LeeDangDung@gmail.com (tested on LPC1769)
Raspberry Pi version:
- initiated by Andre Wussow, 2012, desk@binerry.de, https://github.com/binerry/RaspberryPi
- hacked by Ronan Guilloux, 2013, https://github.com/ronanguilloux/Raspberry-Pi-Utils
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.