{"id":471829,"date":"2025-08-23T15:11:45","date_gmt":"2025-08-23T15:11:45","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=471829"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=471829","title":{"rendered":"<span>\u0414\u0435\u043b\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u044b \u0441 Wi-Fi \u0438\u0437 \u0442\u0435\u0442\u0440\u0438\u0441\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/68a4c1d28f3d780a7fb942ef\" data-style=\"\" id=\"68a4c1d28f3d780a7fb942ef\" width=\"\"><\/div>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u0438\u0434\u0435\u043e, \u0442\u043e \u0443\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u202f\u0441\u0435\u0431\u044f \u044d\u0442\u043e\u0442 \u0433\u0430\u0434\u0436\u0435\u0442, \u043d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044e, \u0447\u0442\u043e \u043e\u043d \u0443\u043c\u0435\u0435\u0442: \u043e\u043d\u043b\u0430\u0439\u043d\u2011\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0444\u043e\u0442\u043e\u0440\u0430\u043c\u043a\u0430, \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u0430, \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0430 \u0438\u0437\u202f\u0444\u0438\u043b\u044c\u043c\u0430 \u00ab\u0422\u0440\u0430\u0441\u0441\u0430\u202f60\u00bb. \u0412\u202f\u0447\u0430\u0441\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c WeAct\u202fESP32\u2011C6\u202fMini \u0441\u202f\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c\u202fESP32\u2011C6\u202fQFN32 \u0438\u202f\u0434\u0438\u0441\u043f\u043b\u0435\u0439\u202fWeAct\u202fST7735 (9\u202f$ \u0437\u0430 \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u202f\u0434\u043e\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0441\u202fAliExpress). <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf9\/f75\/1c7\/bf9f751c7f7c44e805bdf36cbf3a45ea.jpg\" alt=\"\u0412\u0438\u0434 \u0438\u0437\u043d\u0443\u0442\u0440\u0438\" title=\"\u0412\u0438\u0434 \u0438\u0437\u043d\u0443\u0442\u0440\u0438\" width=\"4000\" height=\"3000\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bf9\/f75\/1c7\/bf9f751c7f7c44e805bdf36cbf3a45ea.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf9\/f75\/1c7\/bf9f751c7f7c44e805bdf36cbf3a45ea.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u0438\u0434 \u0438\u0437\u043d\u0443\u0442\u0440\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c: \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u044c \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Adafruit\u202fST7735 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0431\u0435\u043b\u044b\u0435 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0441\u202f\u043a\u0440\u0430\u0451\u0432 \u044d\u043a\u0440\u0430\u043d\u0430 \u2014 \u043e\u0431 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0438\u0436\u0435. \u0417\u0430\u043e\u0434\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0447\u0443: \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u043a\u043e\u0434 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432\u202f\u043f\u043b\u0430\u0442\u0443 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439. <\/p>\n<h4>\u041d\u0435\u0431\u043e\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Arduino IDE<\/h4>\n<ol>\n<li>\n<p>NTPClient from Fabrice Weinberg<\/p>\n<\/li>\n<li>\n<p>Adafruit-GFX-Library<\/p>\n<\/li>\n<li>\n<p>Adafruit-ST7735-Library<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u0434 (\u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 <a href=\"https:\/\/github.com\/SabasSolutions\/Wi-Fi-clock\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>):<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">#include &lt;SPI.h&gt; #include &lt;Adafruit_GFX.h&gt; #include &lt;Adafruit_ST7735.h&gt; #include &lt;Arduino.h&gt; #include &lt;WiFi.h&gt; #include &lt;NTPClient.h&gt; #include &lt;WiFiUdp.h&gt;    \/\/ \u043f\u0438\u043d\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u0435\u043c #define TFT_CS    20    \/\/ Chip select #define TFT_DC    9    \/\/ Data\/Command #define TFT_RST   8   \/\/ Reset #define TFT_BL   19    \/\/ Backlight  \/\/ \u043c\u044f\u0433\u043a\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 SPI-\u043f\u0438\u043d\u043e\u0432: #define TFT_SCK   6  #define TFT_MOSI  2  \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u044f Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);  char ssid[] = \"Your Wi-fi SSID\"; char password[] = \"Your Wi-fi password\"; int status = WL_IDLE_STATUS; WiFiUDP ntpUDP; NTPClient timeClient(ntpUDP); int page = 0; int frames = 0;  #define LOGO_HEIGHT 64 #define LOGO_WIDTH  128   void setup() {   pinMode(0, INPUT_PULLUP);   pinMode(1, INPUT_PULLUP);   pinMode(3, INPUT_PULLUP);   pinMode(14, INPUT_PULLUP);   \/\/ \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c SPI \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0438\u0445 \u043d\u043e\u0436\u0435\u043a   \/\/ \u043f\u043e\u0440\u044f\u0434\u043e\u043a: SCK, MISO (\u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0441\u0442\u0430\u0432\u0438\u043c -1), MOSI, SS (CS)   SPI.begin(TFT_SCK, -1, TFT_MOSI, TFT_CS);    \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u044f   tft.initR(INITR_BLACKTAB);   tft.setRotation(0);   tft.fillScreen(ST77XX_BLACK);   ledcAttach(TFT_BL, 5000, 8);   ledcWrite(TFT_BL, 60);    tft.setTextColor(ST77XX_GREEN);   tft.setTextSize(1);   uint16_t x = (tft.width()  - 6 * 2 * 5) \/ 2;   uint16_t y = (tft.height() - 8 * 2)     \/ 2;   tft.setCursor(0, 0);   tft.println(\"Display initialized\");   delay (1000);   status = WiFi.begin(ssid, password);   if (WiFi.waitForConnectResult() != WL_CONNECTED) {     tft.println(\"Wi-Fi connection error\");     return;   } else {     tft.println(\"Wi-Fi connected\");   }   IPAddress ip = WiFi.localIP();   tft.println(\"Local IP:\");   tft.println(ip);   timeClient.begin();   tft.println(\"NTP Time update\");   timeClient.update();   WiFi.disconnect();   tft.println(timeClient.getFormattedTime());   tft.print(\"\\n\");   tft.print(\"\\n\");   matrix(\"Wake up, Neo...\", 15);   matrix(\"The Matrix has you...\", 21);    }  void loop() {    switch(page) {     case 0:        home();        break;     case 1:        home1();        break;      case 2:        home2();        break;      case 3:        home3();        break;     case 4:        home4();        break;   }  }  void matrix(char text[], int size) {   for (int i = 0; i &lt; size; i++) {     tft.print(text[i]);     delay(200);   }   tft.print(\"\\n\"); }  void matrixstr(String text) {   for (int i = 0; i &lt; text.length(); i++) {     tft.print(text[i]);     delay(200);   }   tft.print(\"\\n\"); }  bool onoff() {   if (!digitalRead(3)) {     delay(200);     return true;   } else {     return false;   } }  bool startpause() {   if (!digitalRead(14)) {     delay(200);     return true;   } else {     return false;   } }  bool sound() {   if (!digitalRead(1)) {     delay(200);     return true;   } else {     return false;   } }  bool reset() {   if (!digitalRead(0)) {     delay(200);     return true;   } else {     return false;   } }  void home() {   while(page==0) {     if (frames==90) {               static int y = 0;               if (y==120) {y = 0;} else {y+=40;}               tft.fillScreen(ST77XX_BLACK);               tft.setTextSize(2);               tft.setCursor(0, y);               day();               \/\/tft.setTextSize(4);               \/\/time();               tft.println(timeClient.getFormattedTime());               frames = 0;     } else {frames++;}       if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;}     delay(30);   } }  void home1() {    static int disp = 0;  if (disp==0) {        tft.fillScreen(ST77XX_BLACK); tft.setTextSize(1); tft.setCursor(0, 40); tft.println(\"Press on\/off when\"); tft.println(\"you're ready.\"); disp = 1;  }       if (onoff()) {           tft.fillScreen(ST77XX_BLACK); tft.setTextColor(ST77XX_WHITE); tft.fillTriangle(64, 33, 118, 126, 10, 126, 0x296d);               tft.setTextSize(2);               tft.setCursor(50, 80); if ((timeClient.getEpochTime() % 2) &gt; 0) { tft.println(\"YES\"); } else { tft.println(\"NO\"); } delay(3000); tft.setTextColor(ST77XX_GREEN); page=0; disp=0; } }  void home2() {   while(page==2) {     if (frames==90) {               static int y = 0;               if (y==120) {y = 0;} else {y+=40;}               tft.fillScreen(ST77XX_BLACK);               tft.setTextSize(2);               tft.setCursor(0, y);               daym();               \/\/tft.setTextSize(4);               \/\/time();               matrixstr(timeClient.getFormattedTime());               frames = 0;     } else {frames++;}       if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;}       delay(30);   } }  void home3() {   while(page==3) {      posters();   } }  void home4() {   while(page==4) {       logoanimation();       if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;}   } }  void nextpage() {   if (page == 2) {     page = 0;   } else {     page++;   } }  void logoanimation() { for (int i = 0; i &lt; 31; i++){ tft.fillScreen(ST77XX_BLACK);     tft.drawBitmap(0, 48, logoallArray[i], LOGO_WIDTH, LOGO_HEIGHT, 0x07E0); delay(21); } }  void posters() { for (int i = 0; i &lt; 6; i++){ tft.drawRGBBitmap(0, 0, postersallArray[i], 128, 160);   if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;} delay(5000); } }  void day() {  int x = timeClient.getDay();  switch(x) {   case 0:     tft.println(\"Sunday\");     break;   case 1:     tft.println(\"Monday\");     break;   case 2:     tft.println(\"Tuesday\");     break;   case 3:     tft.println(\"Wednesday\");     break;   case 4:     tft.println(\"Thursday\");     break;   case 5:     tft.println(\"Friday\");     break;   case 6:     tft.println(\"Saturday\");     break;  } }  void daym() {  int x = timeClient.getDay();  switch(x) {   case 0:     matrixstr(\"Sunday\");     break;   case 1:     matrixstr(\"Monday\");     break;   case 2:     matrixstr(\"Tuesday\");     break;   case 3:     matrixstr(\"Wednesday\");     break;   case 4:     matrixstr(\"Thursday\");     break;   case 5:     matrixstr(\"Friday\");     break;   case 6:     matrixstr(\"Saturday\");     break;  } }  void time() {   tft.print(timeClient.getHours());   tft.print(\":\");   if (timeClient.getMinutes() &lt; 10) {tft.print(0);}   tft.print(timeClient.getMinutes());   tft.print(\"\\n\"); }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 Arduino IDE \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 \u043f\u043b\u0430\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <strong>ESP32 <\/strong>\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430 <strong>Espressif Systems<\/strong>. \u0414\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043b\u0430\u0442\u0443 <strong>ESP32C6 Dev Module<\/strong>. \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b  <strong>Adafruit_ST7735.cpp<\/strong>  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  Adafruit_ST7735_and_ST7789_Library. \u0423 \u043c\u0435\u043d\u044f \u043e\u043d \u043b\u0435\u0436\u0438\u0442 \u0437\u0434\u0435\u0441\u044c:<br \/><strong>C:\\Users\\Paperclip\\Documents\\Arduino\\libraries\\Adafruit_ST7735_and_ST7789_Library<\/strong><\/p>\n<p>\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 <strong>if options<\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Adafruit_ST7735::initR :<\/p>\n<pre><code class=\"cpp\">_colstart = 2; _rowstart = 1;<\/code><\/pre>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2b5\/624\/7f3\/2b56247f3fd10cb4016aeef6ef6f34cc.png\" alt=\"\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c\" title=\"\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c\" width=\"689\" height=\"141\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/2b5\/624\/7f3\/2b56247f3fd10cb4016aeef6ef6f34cc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2b5\/624\/7f3\/2b56247f3fd10cb4016aeef6ef6f34cc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<h2>\u041a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043f\u0438\u043d\u044b<\/h2>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u202f\u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043a\u202f\u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0438\u043d\u0430\u043c, \u0430\u202f\u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0443\u202f\u043c\u0435\u043d\u044f, \u043d\u043e\u202f\u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0438\u043d\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 \u0442\u0443\u202f\u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 SPI, \u0430\u202f\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u043d\u044b \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u202f\u0442\u0440\u043e\u0433\u0430\u0442\u044c. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0438\u0437\u202f\u0434\u0430\u0442\u0430\u0448\u0438\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ed5\/6bb\/151\/ed56bb15110f6d1a0129fc9c910b7937.png\" width=\"1372\" height=\"619\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ed5\/6bb\/151\/ed56bb15110f6d1a0129fc9c910b7937.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ed5\/6bb\/151\/ed56bb15110f6d1a0129fc9c910b7937.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3f5\/79d\/628\/3f579d628565676d87b161cd6ce41daa.png\" width=\"906\" height=\"626\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3f5\/79d\/628\/3f579d628565676d87b161cd6ce41daa.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3f5\/79d\/628\/3f579d628565676d87b161cd6ce41daa.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/280\/222\/d23\/280222d2392934629217377b7883caca.jpg\" width=\"3000\" height=\"4000\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/280\/222\/d23\/280222d2392934629217377b7883caca.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/280\/222\/d23\/280222d2392934629217377b7883caca.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h2>\u0418\u0442\u043e\u0433\u043e<\/h2>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 Bluetooth\u2011\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u043d\u043e \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b, \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0438\u0434\u0435\u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 YES\/NO \u0432 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u00ab\u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0430\u00bb \u0438\u0437 \u0444\u0438\u043b\u044c\u043c\u0430 <em>\u0422\u0440\u0430\u0441\u0441\u0430\u202f60<\/em> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0451\u0442\u043d\u043e\u0435 \u0438\u043b\u0438 \u043d\u0435\u0447\u0451\u0442\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0411\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440 \u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438 \u043f\u043e \u0444\u043e\u043d\u043e\u0432\u043e\u043c\u0443 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e \u043d\u0430 \u043f\u0438\u043d\u0430\u0445 \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043e\u0442\u202fESP, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0442\u043e\u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u044f \u044d\u043d\u0442\u0440\u043e\u043f\u0438\u044e \u043a\u0430\u043a\u0438\u043c\u2011\u043b\u0438\u0431\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c. <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0432\u044b\u0448\u0435\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u0441 Arduino \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 ESP-IDF \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043d\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u043b\u0430\u0442\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f FreeRTOS.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/938830\/\"> https:\/\/habr.com\/ru\/articles\/938830\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/68a4c1d28f3d780a7fb942ef\" data-style=\"\" id=\"68a4c1d28f3d780a7fb942ef\" width=\"\"><\/div>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u0438\u0434\u0435\u043e, \u0442\u043e \u0443\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u202f\u0441\u0435\u0431\u044f \u044d\u0442\u043e\u0442 \u0433\u0430\u0434\u0436\u0435\u0442, \u043d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044e, \u0447\u0442\u043e \u043e\u043d \u0443\u043c\u0435\u0435\u0442: \u043e\u043d\u043b\u0430\u0439\u043d\u2011\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0444\u043e\u0442\u043e\u0440\u0430\u043c\u043a\u0430, \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u0430, \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0430 \u0438\u0437\u202f\u0444\u0438\u043b\u044c\u043c\u0430 \u00ab\u0422\u0440\u0430\u0441\u0441\u0430\u202f60\u00bb. \u0412\u202f\u0447\u0430\u0441\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c WeAct\u202fESP32\u2011C6\u202fMini \u0441\u202f\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c\u202fESP32\u2011C6\u202fQFN32 \u0438\u202f\u0434\u0438\u0441\u043f\u043b\u0435\u0439\u202fWeAct\u202fST7735 (9\u202f$ \u0437\u0430 \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u202f\u0434\u043e\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0441\u202fAliExpress). <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u0438\u0434 \u0438\u0437\u043d\u0443\u0442\u0440\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c: \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u044c \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Adafruit\u202fST7735 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0431\u0435\u043b\u044b\u0435 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0441\u202f\u043a\u0440\u0430\u0451\u0432 \u044d\u043a\u0440\u0430\u043d\u0430 \u2014 \u043e\u0431 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0438\u0436\u0435. \u0417\u0430\u043e\u0434\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0447\u0443: \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u043a\u043e\u0434 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432\u202f\u043f\u043b\u0430\u0442\u0443 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439. <\/p>\n<h4>\u041d\u0435\u0431\u043e\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Arduino IDE<\/h4>\n<ol>\n<li>\n<p>NTPClient from Fabrice Weinberg<\/p>\n<\/li>\n<li>\n<p>Adafruit-GFX-Library<\/p>\n<\/li>\n<li>\n<p>Adafruit-ST7735-Library<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u0434 (\u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 <a href=\"https:\/\/github.com\/SabasSolutions\/Wi-Fi-clock\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>):<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">#include &lt;SPI.h&gt; #include &lt;Adafruit_GFX.h&gt; #include &lt;Adafruit_ST7735.h&gt; #include &lt;Arduino.h&gt; #include &lt;WiFi.h&gt; #include &lt;NTPClient.h&gt; #include &lt;WiFiUdp.h&gt;    \/\/ \u043f\u0438\u043d\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u0435\u043c #define TFT_CS    20    \/\/ Chip select #define TFT_DC    9    \/\/ Data\/Command #define TFT_RST   8   \/\/ Reset #define TFT_BL   19    \/\/ Backlight  \/\/ \u043c\u044f\u0433\u043a\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 SPI-\u043f\u0438\u043d\u043e\u0432: #define TFT_SCK   6  #define TFT_MOSI  2  \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u044f Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);  char ssid[] = \"Your Wi-fi SSID\"; char password[] = \"Your Wi-fi password\"; int status = WL_IDLE_STATUS; WiFiUDP ntpUDP; NTPClient timeClient(ntpUDP); int page = 0; int frames = 0;  #define LOGO_HEIGHT 64 #define LOGO_WIDTH  128   void setup() {   pinMode(0, INPUT_PULLUP);   pinMode(1, INPUT_PULLUP);   pinMode(3, INPUT_PULLUP);   pinMode(14, INPUT_PULLUP);   \/\/ \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c SPI \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0438\u0445 \u043d\u043e\u0436\u0435\u043a   \/\/ \u043f\u043e\u0440\u044f\u0434\u043e\u043a: SCK, MISO (\u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0441\u0442\u0430\u0432\u0438\u043c -1), MOSI, SS (CS)   SPI.begin(TFT_SCK, -1, TFT_MOSI, TFT_CS);    \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u044f   tft.initR(INITR_BLACKTAB);   tft.setRotation(0);   tft.fillScreen(ST77XX_BLACK);   ledcAttach(TFT_BL, 5000, 8);   ledcWrite(TFT_BL, 60);    tft.setTextColor(ST77XX_GREEN);   tft.setTextSize(1);   uint16_t x = (tft.width()  - 6 * 2 * 5) \/ 2;   uint16_t y = (tft.height() - 8 * 2)     \/ 2;   tft.setCursor(0, 0);   tft.println(\"Display initialized\");   delay (1000);   status = WiFi.begin(ssid, password);   if (WiFi.waitForConnectResult() != WL_CONNECTED) {     tft.println(\"Wi-Fi connection error\");     return;   } else {     tft.println(\"Wi-Fi connected\");   }   IPAddress ip = WiFi.localIP();   tft.println(\"Local IP:\");   tft.println(ip);   timeClient.begin();   tft.println(\"NTP Time update\");   timeClient.update();   WiFi.disconnect();   tft.println(timeClient.getFormattedTime());   tft.print(\"\\n\");   tft.print(\"\\n\");   matrix(\"Wake up, Neo...\", 15);   matrix(\"The Matrix has you...\", 21);    }  void loop() {    switch(page) {     case 0:        home();        break;     case 1:        home1();        break;      case 2:        home2();        break;      case 3:        home3();        break;     case 4:        home4();        break;   }  }  void matrix(char text[], int size) {   for (int i = 0; i &lt; size; i++) {     tft.print(text[i]);     delay(200);   }   tft.print(\"\\n\"); }  void matrixstr(String text) {   for (int i = 0; i &lt; text.length(); i++) {     tft.print(text[i]);     delay(200);   }   tft.print(\"\\n\"); }  bool onoff() {   if (!digitalRead(3)) {     delay(200);     return true;   } else {     return false;   } }  bool startpause() {   if (!digitalRead(14)) {     delay(200);     return true;   } else {     return false;   } }  bool sound() {   if (!digitalRead(1)) {     delay(200);     return true;   } else {     return false;   } }  bool reset() {   if (!digitalRead(0)) {     delay(200);     return true;   } else {     return false;   } }  void home() {   while(page==0) {     if (frames==90) {               static int y = 0;               if (y==120) {y = 0;} else {y+=40;}               tft.fillScreen(ST77XX_BLACK);               tft.setTextSize(2);               tft.setCursor(0, y);               day();               \/\/tft.setTextSize(4);               \/\/time();               tft.println(timeClient.getFormattedTime());               frames = 0;     } else {frames++;}       if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;}     delay(30);   } }  void home1() {    static int disp = 0;  if (disp==0) {        tft.fillScreen(ST77XX_BLACK); tft.setTextSize(1); tft.setCursor(0, 40); tft.println(\"Press on\/off when\"); tft.println(\"you're ready.\"); disp = 1;  }       if (onoff()) {           tft.fillScreen(ST77XX_BLACK); tft.setTextColor(ST77XX_WHITE); tft.fillTriangle(64, 33, 118, 126, 10, 126, 0x296d);               tft.setTextSize(2);               tft.setCursor(50, 80); if ((timeClient.getEpochTime() % 2) &gt; 0) { tft.println(\"YES\"); } else { tft.println(\"NO\"); } delay(3000); tft.setTextColor(ST77XX_GREEN); page=0; disp=0; } }  void home2() {   while(page==2) {     if (frames==90) {               static int y = 0;               if (y==120) {y = 0;} else {y+=40;}               tft.fillScreen(ST77XX_BLACK);               tft.setTextSize(2);               tft.setCursor(0, y);               daym();               \/\/tft.setTextSize(4);               \/\/time();               matrixstr(timeClient.getFormattedTime());               frames = 0;     } else {frames++;}       if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;}       delay(30);   } }  void home3() {   while(page==3) {      posters();   } }  void home4() {   while(page==4) {       logoanimation();       if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;}   } }  void nextpage() {   if (page == 2) {     page = 0;   } else {     page++;   } }  void logoanimation() { for (int i = 0; i &lt; 31; i++){ tft.fillScreen(ST77XX_BLACK);     tft.drawBitmap(0, 48, logoallArray[i], LOGO_WIDTH, LOGO_HEIGHT, 0x07E0); delay(21); } }  void posters() { for (int i = 0; i &lt; 6; i++){ tft.drawRGBBitmap(0, 0, postersallArray[i], 128, 160);   if (onoff()) {page=1;}       if (startpause()) {page=2;}       if (sound()) {page=3;}       if (reset()) {page=4;} delay(5000); } }  void day() {  int x = timeClient.getDay();  switch(x) {   case 0:     tft.println(\"Sunday\");     break;   case 1:     tft.println(\"Monday\");     break;   case 2:     tft.println(\"Tuesday\");     break;   case 3:     tft.println(\"Wednesday\");     break;   case 4:     tft.println(\"Thursday\");     break;   case 5:     tft.println(\"Friday\");     break;   case 6:     tft.println(\"Saturday\");     break;  } }  void daym() {  int x = timeClient.getDay();  switch(x) {   case 0:     matrixstr(\"Sunday\");     break;   case 1:     matrixstr(\"Monday\");     break;   case 2:     matrixstr(\"Tuesday\");     break;   case 3:     matrixstr(\"Wednesday\");     break;   case 4:     matrixstr(\"Thursday\");     break;   case 5:     matrixstr(\"Friday\");     break;   case 6:     matrixstr(\"Saturday\");     break;  } }  void time() {   tft.print(timeClient.getHours());   tft.print(\":\");   if (timeClient.getMinutes() &lt; 10) {tft.print(0);}   tft.print(timeClient.getMinutes());   tft.print(\"\\n\"); }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 Arduino IDE \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 \u043f\u043b\u0430\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <strong>ESP32 <\/strong>\u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430 <strong>Espressif Systems<\/strong>. \u0414\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043b\u0430\u0442\u0443 <strong>ESP32C6 Dev Module<\/strong>. \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b  <strong>Adafruit_ST7735.cpp<\/strong>  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  Adafruit_ST7735_and_ST7789_Library. \u0423 \u043c\u0435\u043d\u044f \u043e\u043d \u043b\u0435\u0436\u0438\u0442 \u0437\u0434\u0435\u0441\u044c:<br \/><strong>C:\\Users\\Paperclip\\Documents\\Arduino\\libraries\\Adafruit_ST7735_and_ST7789_Library<\/strong><\/p>\n<p>\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 <strong>if options<\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Adafruit_ST7735::initR :<\/p>\n<pre><code class=\"cpp\">_colstart = 2; _rowstart = 1;<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<h2>\u041a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043f\u0438\u043d\u044b<\/h2>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u202f\u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043a\u202f\u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0438\u043d\u0430\u043c, \u0430\u202f\u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0443\u202f\u043c\u0435\u043d\u044f, \u043d\u043e\u202f\u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0438\u043d\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 \u0442\u0443\u202f\u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 SPI, \u0430\u202f\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u043d\u044b \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u202f\u0442\u0440\u043e\u0433\u0430\u0442\u044c. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0438\u0437\u202f\u0434\u0430\u0442\u0430\u0448\u0438\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f. <\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<h2>\u0418\u0442\u043e\u0433\u043e<\/h2>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 Bluetooth\u2011\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u043d\u043e \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b, \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0438\u0434\u0435\u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 YES\/NO \u0432 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u00ab\u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0430\u00bb \u0438\u0437 \u0444\u0438\u043b\u044c\u043c\u0430 <em>\u0422\u0440\u0430\u0441\u0441\u0430\u202f60<\/em> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0451\u0442\u043d\u043e\u0435 \u0438\u043b\u0438 \u043d\u0435\u0447\u0451\u0442\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0411\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440 \u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438 \u043f\u043e \u0444\u043e\u043d\u043e\u0432\u043e\u043c\u0443 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e \u043d\u0430 \u043f\u0438\u043d\u0430\u0445 \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043e\u0442\u202fESP, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0442\u043e\u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u044f \u044d\u043d\u0442\u0440\u043e\u043f\u0438\u044e \u043a\u0430\u043a\u0438\u043c\u2011\u043b\u0438\u0431\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c. <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0432\u044b\u0448\u0435\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u0441 Arduino \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 ESP-IDF \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043d\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u043b\u0430\u0442\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f FreeRTOS.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/938830\/\"> https:\/\/habr.com\/ru\/articles\/938830\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-471829","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=471829"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471829\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=471829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=471829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=471829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}