-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcoronaDisplay_trigBoardEpaper.ino
65 lines (58 loc) · 1.5 KB
/
coronaDisplay_trigBoardEpaper.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include "includes.h"
const char fwVersion[] = "11/24/20_COVID19";
//ADDED THIS STUFF FOR COVID DISPLAY
//epaper library here:
//https://github.com/ZinggJM/GxEPD
//DIN goes to 13
//CLK goes to 14
//the other signals
//CS to 15
//DC to 33
//RST to 32
//BUSY to 39
#include <SPI.h>
#include <GxEPD.h>
#include <GxGDEW075T8/GxGDEW075T8.h> // 7.5" b/w
//640x384
//FreeFonts from Adafruit_GFX, make sure you install this library too from lib manager
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold18pt7b.h>
#include <Fonts/FreeMonoBold24pt7b.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>
SPIClass spiDisplay(HSPI);
GxIO_Class io(spiDisplay, /*CS=*/ 15, /*DC=*/ 33, /*RST=*/ 32);
GxEPD_Class ePaperDisplay(io, 32, 39 /*RST*/ /*BUSY*/);
void ePaperUpdate();
void setup() {
pinMode(ESPlatchPin, OUTPUT);
digitalWrite(ESPlatchPin, HIGH);
pinMode(LEDpin, OUTPUT);
Serial.begin(115200);
checkWakeupPins();
loadConfiguration(filename, config);
rtcInit(config.timerCountDown, false);
Serial.println(getBattery(), 2);
if (connectWiFi()) {
ePaperUpdate();
}
// if (pushLogic()) { //decide if push will occur or nt and what message will be
// if (wiFiNeeded) {
// if (connectWiFi()) {
// pushOver();
// pushSafer();
// ifttt();
// mqtt();
// }
// }
// udp();
// }
killPower();
waitForButton();
initBluetooth();
}
void loop() {
serviceBluetooth();
checkOTA();
}