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

  1. OBJECTIVE

Create a Python that utilizes two lines on the Adafruit LCD display.

  1. 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

  1. Boot up the Raspberry Pi.

  2. Open IDLE.

  3. 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)

  1. Run the program. Observe the results.

  2. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!