Question
In this section, you will write a program to show a rotating banner on the LCD screen. Every 300 milliseconds, the text Microcontrollers are lots
In this section, you will write a program to show a rotating banner on the LCD screen. Every 300 milliseconds, the text "Microcontrollers are lots of fun!" should move one position to the left. This banner should repeat indefinitely. Edit your helloworld project, as it provides a good starting point.
Here are the requirements of the output:
Only the first line of the LCD screen should be used. The LCD screen has 4 lines. The second line should be blank all the time.
At the beginning, the first letter 'M' appears on the right side of Line 1. The following characters appear one by one every 0.3 second.
After the 20th letter appears, new characters appear one by one every 0.3 second and push the old letters off the LCD screen.
After the last character '!' appears on the right, the message continues shifting to the left. Every 300 milliseconds the leftmost letter is pushed out until the screen is completely cleared.
After the screen is cleared for 0.3 second, repeat the whole procedure again. The banner should repeat forever until the board is turned off.
You need to write your program so that the message can be changed quickly. The TA will ask you to display a new message during the demo. You should only need to make a minor change to your program and compile.
There are three functions that have been written for you that will help:
timer_waitMillis(uint32_t millis): Delay the program execution for 'millis' milliseconds.
lcd_init(): Initializes the IO ports to communicate with the LCD controller; clears the screen.
lcd_printf(const char *fmt, ...): Clears the screen and displays text. See documentation on printf.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started