-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoorDisplay.cpp
More file actions
43 lines (37 loc) · 1.01 KB
/
doorDisplay.cpp
File metadata and controls
43 lines (37 loc) · 1.01 KB
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
#include <Arduino.h>
#include <LiquidCrystal_I2C.h>
#include "doorDisplay.h"
void DoorDisplay::readyMessage() {
this->message(" ^ ^ ^ ^ ^ ^ ^"," Ready to Scan");
}
void DoorDisplay::verifyMessage() {
this->message(" Verifying Card", "");
}
void DoorDisplay::verifyMessage2() {
this->message(" Verifying Card", " AUTHORIZING...");
}
void DoorDisplay::serverFailMessage() {
this->message("", "BADGE ERROR");
}
void DoorDisplay::loadingMessage(const char* msg) {
this->message("LOADING...", msg);
}
DoorLCDDisplay::DoorLCDDisplay(LiquidCrystal_I2C* lcdPtr) {
lcd = lcdPtr;
lcd->init();
lcd->backlight();
}
void DoorLCDDisplay::message(const char *line1, const char* line2) {
lcd->init();
lcd->clear();
lcd->setCursor(0,0);
lcd->print(line1);
lcd->setCursor(0,1);
lcd->print(line2);
}
void DoorSerialDisplay::message(const char *line1, const char* line2) {
Serial.print("LCD: ");
Serial.println(line1);
Serial.print("LCD: ");
Serial.println(line2);
}