43 lines
1.3 KiB
C++
Executable File
43 lines
1.3 KiB
C++
Executable File
#include "epd2in7.h"
|
|
#include "epdpaint.h"
|
|
|
|
// b/w e-Paper
|
|
#define COLORED 0
|
|
#define UNCOLORED 1
|
|
|
|
Epd epd;
|
|
|
|
// WiFi
|
|
char wiFiSSID[] = "SSID"; // SSID of your network
|
|
char wiFiPSK[] = "PRE-SHARED KEY"; //password of your WPA Network
|
|
|
|
// style of the frame shown
|
|
sFONT TITLE_FONT = Font20;
|
|
char TITLE_TEXT[] = "Losung heute";
|
|
sFONT TEXT_FONT = Font12; // for the daily text
|
|
int TEXT_WIDTH = 168; // width of the box around the text; should be a multiple of the width of the font (eg. Font8 => multiple of 8)
|
|
int TEXT_PADDING_TOP = 40;
|
|
int TEXT_PADDING_BETWEEN_BLOCKS = 20; // pixels between the lines
|
|
int TEXT_PADDING_BETWEEN_LINES = 1; // pixels between the lines
|
|
sFONT SOURCE_FONT = Font8; // for the position in bible
|
|
|
|
void setup() {
|
|
// put your setup code here, to run once:
|
|
Serial.begin(115200);
|
|
|
|
Serial.println("[INFO] Initializing e-Paper...");
|
|
if (epd.Init() != 0) {
|
|
Serial.println("[FATAL] Failed initializing e-Paper; Exiting...");
|
|
return;
|
|
}
|
|
Serial.println("[INFO] Initialized e-Paper!");
|
|
|
|
connectWiFi();
|
|
String html = getHTML("https://www.losungen.de/fileadmin/media-losungen/heute/2022/0821.html");
|
|
|
|
showDailyText(getLosungFromHTML(html), getLehrtextFromHTML(html), getLosungSourceFromHTML(html), getLehrtextSourceFromHTML(html));
|
|
}
|
|
|
|
void loop() {
|
|
}
|