Code Monkey home page Code Monkey logo

raspberry-pcd8544's Introduction

Raspberry-pcd8544

pcd8544(NOKIA5110) Command Line Tool for Raspberry Pi / Orange Pi

You can operate from command line.

Command line parameters:

+1 String : String for #1 line(with External 4X8 Font)
+2 String : String for #2 line(with External 4X8 Font)
+3 String : String for #3 line(with External 4X8 Font)
+4 String : String for #4 line(with External 4X8 Font)
+5 String : String for #5 line(with External 4X8 Font)
+6 String : String for #6 line(with External 4X8 Font)
+a String : String for #1 line(with Internal 6X8 Font)
+b String : String for #2 line(with Internal 6X8 Font)
+c String : String for #3 line(with Internal 6X8 Font)
+d String : String for #4 line(with Internal 6X8 Font)
+e String : String for #5 line(with Internal 6X8 Font)
+f String : String for #6 line(with Internal 6X8 Font)
-1 : delete #1 line
-2 : delete #2 line
-3 : delete #3 line
-4 : delete #4 line
-5 : delete #5 line
-6 : delete #6 line
+L : Scroll Up 1Line
-L : Scroll Down 1Line
P1 n : Set start colum n to line#1
P2 n : Set start colum n to line#2
P3 n : Set start colum n to line#3
P4 n : Set start colum n to line#4
P5 n : Set start colum n to line#5
P6 n : Set start colum n to line#6
r : remove all string
s : show display
c num : set contrast to num

You can use within script.
#!/bin/bash
./nokia r
./nokia +1 "ABCDEFG"
./nokia +2 "abcdefg"
./nokia +3 "1234567"
./nokia +d "ABCDEFG"
./nokia +e "abcdefg"
./nokia +f "1234567"
sudo ./nokia s


Wire connection

NOKIA5110 --- RPi/OPi
1 RST --- GPIO23 (Pin#16)
2 CE --- SPI CE0 (Pin#24)
3 DC --- GPIO24 (PIn#18)
4 DIN --- SPI MOSI (Pin#19)
5 CLK --- SPI SCLK (Pin#23)
6 VCC --- 3.3V
7 BL --- 3.3V/GND(*)
8 GND --- GND

(*)There are two module of GND and 3.3V.
With BLUE module, if you supplies 3.3V to backlight pin, a backlight lights up.
With RED module, if you connects a backlight pin to GND, a backlight lights up.


Software requirement

WiringPi Library


How to install

git clone https://github.com/nopnop2002/Raspberry-pcd8544
cd Raspberry-pcd8544
cc -o nokia nokia.c fontx.c pcd8544.c -lwiringPi -lpthread
bash ./test.sh

Line#1-#3 : External 4X8 Font
Line#5-#6 : Internal 6X8 Font

pcd8544-11

pcd8544-12


RaspberryPi HAT

// pin setup
#define _sclk  0
#define _din   1
#define _dc    2
#define _cs    3
#define _rst   4

PI-HAT-1 PI-HAT-2 PI-HAT-3

raspberry-pcd8544's People

Contributors

nopnop2002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

raspberry-pcd8544's Issues

Cannot compile

~/pcd8544_rpi$ cc -o nokia nokia.c fontx.c pcd8544.c -lwiringPi -lpthread
nokia.c:25:10: fatal error: wiringPi.h: No such file or directory
 #include <wiringPi.h>
          ^~~~~~~~~~~~
compilation terminated.
pcd8544.c:5:10: fatal error: wiringPi.h: No such file or directory
 #include <wiringPi.h>
          ^~~~~~~~~~~~
compilation terminated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.