Liquid Crystal Display (LCD)

Vanmiddag is het gelukt om na wat priegelen met codes op de Arduino een zinnetje door te laten scrollen op een aangesloten LCD schermpje! Om het beeldscherm aan te sturen moet je de LiquidCrystel bibliotheek aanspreken in het begin van de code. Om tekst te laten scrollen moet je de lcd.scrollDisplay() aanroepen. Het zwarte draaiknopje, ook wel een potentiometer (POT) genoemd, moet aangesloten zijn om het contrast van de tekst te bepalen.

 

Zijn eerste woordjes

IMG_20150907_161644

 

Wie ziet deze grappige coincidence ?

IMG_20150907_162546

 

Et voila! (Shoutout naar Roy Sijnesael voor de quote! )

 

Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <LiquidCrystal.h>
 
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
 
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
}
 
void loop() {
lcd.print("It's simple, we just kill the Batman!");
delay(500);
// scroll 13 positions (string length) to the left
// to move it offscreen left:
for (int positionCounter = 0; positionCounter < 21; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(500);
}
 
lcd.clear();
delay(700);
}

One Response to “Liquid Crystal Display (LCD)

Leave a Reply

Your email address will not be published. Required fields are marked *