Advertisement
LeventeDaradici

LCD4LINUX on ESP32-2432s028

May 19th, 2023
1,585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | Source Code | 0 0
  1. //
  2. // Levente Daradici https://www.youtube.com/@LeventeDaradici/videos
  3. // LCD4Linux on ESP32-2432s028
  4. //
  5. #include <TFT_eSPI.h>              
  6. TFT_eSPI tft = TFT_eSPI();        
  7. #include <HTTPClient.h>
  8.  
  9. #define USE_LINE_BUFFER
  10. #include "support_functions.h"
  11. #define WIFI_SSID "YOUR WIFI SSID"
  12. #define WIFI_PASS "YOUR WIFI PASSWORD"
  13.  
  14. void setup()
  15. {
  16.   Serial.begin(115200);
  17.   tft.begin();
  18.   tft.setRotation(3);
  19.  
  20.   WiFi.begin(WIFI_SSID, WIFI_PASS);
  21.   while (WiFi.status() != WL_CONNECTED) {
  22.     Serial.print(".");
  23.     delay(1000);
  24.   }
  25.   Serial.println("\n WiFi connected.\n");
  26.  
  27.   tft.fillScreen(0);
  28.   //tft.fillRect(0,0,232,134, TFT_BLUE);
  29. }
  30.  
  31.  
  32. void loop()
  33. {
  34.   //tft.fillScreen(0);
  35.   //tft.fillRect(1,1,230,132,TFT_BLACK);
  36.   setPngPosition(1, 1);
  37.   load_png("http://192.168.X.XXX/lcd4linux/dpf.png"); // Your Receiver IP
  38.   delay(200);
  39.    
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement