Question: Title: Displaying Messages on Two LCD Lines OBJECTIVE Create a Python that utilizes two lines on the Adafruit LCD display. DESCRIPTION The newline character is
Title: Displaying Messages on Two LCD Lines
-
OBJECTIVE
Create a Python that utilizes two lines on the Adafruit LCD display.
-
DESCRIPTION
The newline character is used to force the next character to a new line. The 16x2 LCD could display a total of 32 characters at a time: 16 characters on Line 1 and 16 characters on Line 2. Spaces are used to center text on a line. Refer to the program below.
III. PROCEDURE
-
Boot up the Raspberry Pi.
-
Open IDLE.
-
Enter the program below.
Name = 'Put Your Name Here'
Class = 'ECT109'
Assignment = 'Week 6 Lab 1'
#------------------------------------------------------
# Display messages on two lines
#------------------------------------------------------
import time
from time import sleep
from Adafruit_CharLCDPlate import Adafruit_CharLCDPlate
lcd = Adafruit_CharLCDPlate()
lcd.clear()
lcd.message( John Doe ECT109)
sleep(3)
lcd.clear()
lcd.message(done)
-
Run the program. Observe the results.
-
Your assignment is to modify the above program to add another two-line message (such as Week 6 & Lab 1). Make sure to pause between messages.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
