diff --git a/E-Paper_Showerthoughts.ino b/E-Paper_Showerthoughts.ino index b5edcd8..72339d5 100644 --- a/E-Paper_Showerthoughts.ino +++ b/E-Paper_Showerthoughts.ino @@ -64,7 +64,7 @@ void connectToWifi() { } if(connectTries >= 20) { - Serial.println("Unable to connect to " + WiFi.SSID() + ". ESP32 going to deep sleep."); + Serial.println("WIFI: Unable to connect to " + WiFi.SSID() + ". ESP32 going to deep sleep."); esp_wifi_stop(); esp_bt_controller_disable(); esp_deep_sleep_start(); @@ -72,7 +72,7 @@ void connectToWifi() { connectTries++; } - Serial.println("WIFI: Connected to network"); + Serial.println("WIFI: Connected to network: " + WiFi.SSID()); Serial.println(WiFi.localIP()); Serial.println(WiFi.macAddress()); } @@ -111,8 +111,8 @@ String getShowerthought() { // Connect to reddit.com and fetch the showerthought data using the web client Serial.println("Fetching Showerthougt"); if(!client.connect(host, port)) { - Serial.println("connection 1 failed!"); - return "Impossible to connect to Reddit"; + Serial.println("SECURE CLIENT: Connection 1 failed!"); + return "Unable to connect to Reddit"; } String url = "/r/Showerthoughts/random.json?sort=hot&limit=1&t=day"; client.print(String("GET ") + url + " HTTP/1.1\r\n" + @@ -122,7 +122,7 @@ String getShowerthought() { unsigned long timeout = millis(); while (client.available() == 0) { if (millis() - timeout > 5000) { - Serial.println(">>> Client Timeout !"); + Serial.println("SECURE CLIENT: Client Timeout!"); client.stop(); return "Reddit did not respond in time"; } @@ -160,7 +160,7 @@ String getShowerthought() { while(client.connected()) { String line = client.readStringUntil('\n'); if (line == "\r") { - Serial.println("headers received"); + Serial.println("DEBUG: Headers received"); break; } } diff --git a/README.md b/README.md index eb5be7f..071a890 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This code uses an ESP32 to fetch latest posts from [/r/showerthoughts](https://www.reddit.com/r/Showerthoughts/) and displays them on a Waveshare e-paper display. Afterwards it puts the ESP to deep sleep mode. All components run on battery power without annoying cables. ![Front](img/01_Front.jpg) -![Front](img/02_Back.jpg) +![Back](img/02_Back.jpg) #### Used Hardware + [Waveshare 7.5" e-paper display](https://www.waveshare.com/7.5inch-e-paper.htm) diff --git a/credentials.h b/credentials.h deleted file mode 100644 index bd05d66..0000000 --- a/credentials.h +++ /dev/null @@ -1,8 +0,0 @@ -// WIFI -const char* ssid = ""; -const char* password = ""; - -// REDDIT -const char* host = "www.reddit.com"; -const int port = 443; -const char fingerprint[] = "77:C7:6C:11:70:33:25:EE:F0:6C:3B:E3:0F:15:C2:CB:2A:73:7A:56:F3:40:FD:76:29:1E:06:CB:0D:45:48:2C"; diff --git a/img/original_logo.jpg b/img/original_logo.jpg new file mode 100644 index 0000000..d38fe21 Binary files /dev/null and b/img/original_logo.jpg differ diff --git a/logo.h b/logo.h index 7b31c07..181aee5 100644 --- a/logo.h +++ b/logo.h @@ -11,7 +11,7 @@ // * Output: Arduino Code // * Draw Mode: Horizontal - 1 bit per pixel -const unsigned char logo [] PROGMEM = { +const unsigned char logo_225x225 [] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,