losungepaper/losungepaper.ino
2022-08-21 17:28:52 +02:00

43 lines
1.4 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!");
String losung = "Gott spricht: Ich will für Israel wie der Tau sein, dass es blüht wie eine Lilie.";
String lehrtext = "Ich bin der Weinstock, ihr seid die Reben. Wer in mir bleibt und ich in ihm, der bringt viel Frucht; denn ohne mich könnt ihr nichts tun.";
showDailyText(losung, lehrtext, "Hosea 14,6", "Johannes 15,5");
}
void loop() {
connectWiFi();
}