Professional Documents
Culture Documents
Activity 1
WIRING DIAGRAM
m
er as
co
eH w
o.
DESCRIPTION rs e
ou urc
The activity was about a 16x2 LCD that displays a combination of
o
scrolling text and a timer. The first line of the LCD was supposed to scroll
aC s
from left to right and when it reaches a certain part of the text, will scroll
vi y re
from right to left. The second line of the LCD will display a timer.
BILL OF MATERIALS
ed d
ar stu
Arduino Uno R3 1
16 x 2 LCD 1
Th
250 kΩ 1
Potentiometer
220Ω resistor 1
sh
PROGRAM
Code:
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:35 GMT -05:00
https://www.coursehero.com/file/90444266/Laboratory-Report-Activity-1docx/
// include the library code:
#include <LiquidCrystal.h> if (iCursor == (iLenofText - 1) ) {
// initialize the library with the iCursor = 0;
numbers of the interface pins
}
lcd.setCursor(0,iLineNumber);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
char * Text = "Hello world! ";
if (iCursor < iLenofText - 16){
int iLineNumber = 0;
for (int iChar = iCursor; iChar <
int iCursor = 0; iCursor + 16 ; iChar++){
lcd.print(Text[iChar]);
void setup(){ }
m
er as
lcd.begin(16,2); }
co
eH w
} else {
o.
for (int iChar = iCursor; iChar <
rs e (iLenofText - 1) ; iChar++) {
ou urc
void loop(){
lcd.print(Text[iChar]);
UpdateLCDDisplay();
}
o
delay(1000);
aC s
}
ar stu
}
iCursor++;
void UpdateLCDDisplay(){ }
is
Flowchart:
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:35 GMT -05:00
https://www.coursehero.com/file/90444266/Laboratory-Report-Activity-1docx/
m
er as
co
eH w
o.
rs e
ou urc
o
aC s
vi y re
ed d
ar stu
is
CONCLUSION
Th
How the output was dependent on the size of the LCD as well as the length
of text that was supposed to be the output.
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:35 GMT -05:00
https://www.coursehero.com/file/90444266/Laboratory-Report-Activity-1docx/
Powered by TCPDF (www.tcpdf.org)