Using Displays in Raspberry Pi Projects
Author: Dogan Ibrahim
Publisher: Elektor International Media B.V.
This publication explores the integration and use of various display types with Raspberry Pi projects. It covers fundamental setup, programming techniques, and practical examples for different display technologies.
Table of Contents
Declaration
Preface
Chapter 1: Installing the Operating System on Raspberry Pi
- 1.1 Overview
- 1.2 Raspbian Buster installation steps on Raspberry Pi 4
- 1.3 Using a networked connection
- 1.4 Remote access
- 1.5 Using Putty
- 1.5.1 Configuring Putty
- 1.6 Desktop remote access
- 1.7 Static IP address
- 1.8 Summary
Chapter 2: Raspberry Pi Program Development
- 2.1 Overview
- 2.2 The nano text editor
- 2.3 Creating and running a Python program
- 2.4 Summary
Chapter 3: GPIO
- 3.1 Overview
- 3.2 The Raspberry Pi 4 GPIO connector
- 3.3 Interfacing to the GPIO
- 3.3.1 Loads requiring small currents
- 3.3.2 Loads requiring higher currents
- 3.3.3 Using relays
- 3.4 The GPIO library
- 3.4.1 Pin numbering
- 3.4.2 Channel (I/O port pin) configuration
- 3.5 Raspberry Pi project development cycle
- 3.5.1 The hardware
- 3.5.2 The software
- 3.6 Summary
Chapter 4: LED Projects
- 4.1 Overview
- 4.2 Project 1: Alternate flashing red, green, and blue LEDs
- 4.3 Running a program automatically at startup time
- 4.4 Scheduling a program to run at specified times
- 4.5 Project 2: Binary up counting LEDs
- 4.6 Project 3: Random flashing Christmas lights
- 4.7 Project 4: Lucky day of the week
- 4.8 Project 5: LED bargraph
- 4.9 Project 6: Using shift registers in LED displays
- 4.10 Project 7: The BarGraph click board – Counting up in binary
- 4.11 Project 8: The BarGraph click board – Bar graph
- 4.12 Project 9: 2 digit multiplexed 7-Segment LED display seconds counter
- 4.13 Project 10: 2 digit 7-segment temperature display
- 4.14 Project 11: 4 digit 7-segment display seconds counter
- 4.15 Project 12: Using the UT-M 7-SEG R Click board – 2 digit up counter
- 4.16 Project 13: MAX7219 based 8 Digit 7-Segment LED – 8 digit up counter
- 4.17 Project 14: Using a dot matrix display – Dot Matrix R Click
- 4.18 Using a 8x32 dot matrix display
- 4.19 Project 15: Matrix display - Displaying letters
- 4.20 Project 16: Matrix display - Drawing a rectangle box with letters
- 4.21 Project 17: Matrix display - Scrolling text
- 4.22 Project 18: Matrix display - Scrolling printable ASCII characters in small font
- 4.23 Using LED strips
- 4.24 Project 19: LED strip: displaying different colours
- 4.25 Project 20: LED strip: displaying random colours (all LEDs have same colours)
- 4.26 Project 21: LED strip: displaying random colours (LEDs have different colours)
- 4.27 Summary
Chapter 5: Using Liquid Crystal Displays (LCDs)
- 5.1 Overview
- 5.2 HD44780 LCD module
- 5.3 Installing the Python library for parallel LCDs
- 5.4 The library functions
- 5.5 Project 1: Parallel LCD - Seconds Counter
- 5.6 Project 2: Parallel LCD – Read text from the keyboard and display on LCD
- 5.7 Project 3: Parallel LCD – Scrolling text read from the keyboard
- 5.8 Project 4: Parallel LCD – Displaying temperature and humidity
- 5.9 Project 5: Parallel LCD – Display the current date and time on the LCD
- 5.10 Using I²C LCDs
- 5.11 Project 6: I²C LCD – Read text from the keyboard and display on LCD
- 5.12 Project 7: I²C LCD – Display the current date and time on the LCD
- 5.13 Project 8: I²C LCD – Displaying temperature and humidity
- 5.14 Summary
Chapter 6: Using Organic Light Emitting Diode Displays (OLED)
- 6.1 Overview
- 6.2 Using OLED displays
- 6.3 Project 1: Displaying pixels at the four corners of the display
- 6.4 Project 2: Displaying text
- 6.5 Project 3: Displaying Shapes
- 6.6 Project 4: Creating and displaying a bitmap
- 6.7 Summary
Chapter 7: Using e-paper Displays
- 7.1 Overview
- 7.2 How do e-paper displays work?
- 7.3 Use of the e-paper displays
- 7.4 Advantages and disadvantages of the e-paper displays
- 7.5 Comparing the e-paper displays with LCDs
- 7.6 Coloured e-paper displays
- 7.7 Project 1: Using an e-paper – displaying rectangle with text inside
- 7.8 Project 2: Using an e-paper – displaying an image
- 7.9 Summary
Chapter 8: Plotting Graphs
- 8.1 Overview
- 8.2 Plotting in Python
- 8.2.1 Graph of a quadratic function
- 8.2.2 Drawing multiple graphs
- 8.3 Project - Real-Time graph of the temperature and humidity
- 8.4 Summary
Chapter 9: Using Thin-Film-Transistor (TFT) Displays
- 9.1 Overview
- 9.2 The 1.8 inch TFT display
- 9.3 Project 1: Drawing a green colour rectangle with blue colour text inside
- 9.4 Project 2: Displaying the temperature in blue or red colour
- 9.5 Project 3: Displaying thermometer image and temperature
- 9.6 Summary
Chapter 10: Using the 7-inch Raspberry Pi Touch Screen
- 10.1 Overview
- 10.2 Installing the display
- 10.3 Project 1: Drawing graphics
- 10.4 Project 2: Taking selfie pictures using a camera and 7-inch display
- 10.5 The Tkinter graphical interface software
- 10.5.1 Label
- 10.5.2 Button
- 10.5.3 Entry
- 10.5.4 Grid
- 10.5.5 Radio button
- 10.5.6 Checkbox
- 10.5.7 Dialogs
- 10.5.8 Scale (slider)
- 10.5.9 Menu
- 10.5.10 Binding to events
- 10.6 Using the ttk module
- 10.7 Project 3: GUI program to convert Degrees Centigrade to Degrees Fahrenheit
- 10.8 Project 4: GUI program to display the ambient temperature and humidity
Appendix
- A.1 Program: RGB.py
- A.2 Modified program: RGB2.py
- A.3 Program: LEDCounter.py
- A.4 Program: RandomLEDS.py
- A.5 Program: LuckyDay.py
- A.6 Program: BarLED.py
- A.7 Program: ShiftLED.py
- A.8 Modified Program: ShiftLED2.py
- A.9 Program: BarClick.py
- A.10 Program: BarClickGraph.py
- A.11 Program: SevenCount.py
- A.12 Program: SevenCount2.py
- A.13 Program: dht11.py
- A.14 Program: SevenCount4.py
- A.15 Program: UTM7SEG.py
- A.16 Program: MAX7219DISP.py
- A.17 Library: MAX7219
- A.18 Program: MAX7219TEST.py
- A.19 Program: DotMatrix.py
- A.20 Modified Program: DotMatrix2.py
- A.21 Library: Matrix.py
- A.22 Font: Fonts.py
- A.23 Program: MatrixTEST.py
- A.24 ASCII fonts used in the program (ASCII.py)
- A.25 Library: MatrixAscii.py
- A.26 Program: MatrixAsciiTest.py
- A.27 Program: MatrixLetters.py
- A.28 Program: MatrixRectangle.py
- A.29 Program: MatrixScroll.py
- A.30 Program: MatrixTinyFont.py
- A.31 Program: LEDStripScan.py
- A.32 Program: LEDStripColours.py
- A.33 Program: LEDStripColours2.py
- A.34 Program: LCDCounter.py
- A.35 Program: LCDKeyboard.py
- A.36 Program: LCDScroll.py
- A.37 Program: LCDDHT11.py
- A.38 Program: LCDTIME.py
- A.39 Program: LCDI2CKeyboard.py
- A.40 Program: LCDI2CTIME.py
- A.41 Program: LCDI2CDHT11.py
- A.42 Program: OLEDCorners.py
- A.43 Program: OLEDText.py
- A.44 Program: OLEDRect.py
- A.45 Program: OLEDShape1.py
- A.46 Program: OLEDShape2.py
- A.47 Program: OLEDBitmap.py
- A.48 Program: EPAPERtext.py
- A.49 Program: EPAPERimg.py
- A.50 Program: graph.py
- A.51 Program: TFT1.py
- A.52 Program: TFTtemperature.py
- A.53 Program: TFTImgtemperature.py
- A.54 Program: graphs7inch.py
- A.55 Program: camdisp.py
- A.56 Program: camdisp2.py
- A.57 Program: gui1.py
- A.58 Program: gui2.py
- A.59 Program: gui3.py
- A.60 Program: gui5.py
- A.61 Program: gui6.py
- A.62 Program: gui7.py
- A.63 Program: gui8.py
- A.64 Program: gui9.py
- A.65 Program: gui10.py
- A.66 Program: gui11.py
- A.67 Program: gui12.py
- A.68 Program: gui13.py
- A.69 Program: gui14.py
- A.70 Program: CTOF.py
- A.71 Program: TH7display.py