-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplayModule.h
More file actions
executable file
·50 lines (47 loc) · 1.6 KB
/
DisplayModule.h
File metadata and controls
executable file
·50 lines (47 loc) · 1.6 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
44
45
46
47
48
49
50
/*
Library fpr the TFT screen
*/
#ifndef DisplayModule_h
#define DisplayModule_h
//#include "Arduino.h"
#include <Adafruit_ILI9341.h>
#include <Adafruit_GFX.h>
class DisplayModule
{
public:
DisplayModule(int8_t csPin, int8_t dcPin, int8_t rstPin);
~DisplayModule();
void PrintMainScreen();
void clearDisp();
void printStartMsg();
void printWifiStart();
void printWifiFail();
void printLdrMode();
void printTft(String msg, int x, int y, int fgColor, int bgColor, int size, bool newline);
void printTime(String fTime);
void printTftSimple(String msg, bool newline);
int defaultScreen();
void updatDefTime(String fTime);
void printPeep(int p);
void setPeepBuffer(int i);
void startDisp();
void defaultOverlay(String charge, String fTime, String pos, String state, String sch, String tmp);
void showOpen();
const static int DEFAULT_SCREEN = 0;
const static int DOOR_OPEN_SCREEN = 1;
const static int DOOR_CLOSE_SCREEN = 2;
const static int SCREEN_CNT = 3;
private:
Adafruit_ILI9341 tft;
int peepBufferIndex;
const String peepBuffer[4] = {""," "," "," "};
const String startMsg = "Starting Poultry Portal...";
const String connWifi = "Connecting to wifi...";
const String wifiConnError = "Could not connect to wifi!";
const String wifiConnSuccess = "Connected to wifi";
const String ldrMode = "Running on Light Sense";
const String sClose = "CLOSE?";
const String sOpen = "OPEN?";
const String tempRow = "Temperature:";
};
#endif