-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArduinoLCD.ino
51 lines (43 loc) · 1.06 KB
/
ArduinoLCD.ino
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
###################################
# CONNECTION #
# LCD Arduino #
# D4 5 #
# D5 4 #
# D6 3 #
# D7 2 #
# E 11 #
# RS 12 #
# A 5V #
# K GND #
# VDD 5V #
# VSS GND #
# V0 6 #
# RW GND #
###################################
*/
#include <LiquidCrystal.h>
int Contrast = 60;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
char DATA[50]= "";
void setup(){
Serial.begin(9600);
analogWrite(6, Contrast);
lcd.begin(16, 2);
lcdScanCard();
}
void loop(){
byte n = Serial.available();
if(n != 0){
Serial.readBytesUntil('>',DATA,50);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Welcome");
delay(1500);
lcdScanCard();
}
}
void lcdScanCard(){
lcd.setCursor(0, 0);
lcd.print("Scan Card...");
}