void GxepdPage5() { display.setRotation(4); display.fillScreen(GxEPD_WHITE); display.setTextColor(GxEPD_BLACK); display.setFont(); display.setTextSize(1); DrawBattery( 0, 21); //DrawRSSI(105, 21, wifi_signal); display.setTextColor(GxEPD_RED); clok(70, 19); display.setTextColor(GxEPD_BLACK); display.drawLine(10,25, 128, 25, GxEPD_BLACK);//x1 y1 x2 y2 display.drawLine(127, 25, 127, 295, GxEPD_BLACK);//x1 y1 x2 y2 for (int i=0;i<6;i++) {DisplayForecastWeatherh3(0, 55, i);//x,y,index ,день недели } display.update(); // опрос кнопок 10с перед сном for (int i = 0; i < 200; i++) { // покинуть цикл при достижении 100 delay (100); if ((i == 70)||(i == 80)||(i == 90)) testSpeaker2(); if (i == 100) break; bool gpio_get_level_38 = digitalRead(38); if (gpio_get_level_38 == 1) {testSpeaker(); // Serial.println("GxepdPage4"); Kalendar(); break; } bool gpio_get_level_37 = digitalRead(37); if (gpio_get_level_37 == 1) {testSpeaker(); GxepdPage6(); break; } bool gpio_get_level_39 = digitalRead(39); if (gpio_get_level_39 == 1) {testSpeaker(); GxepdPage2(); break; } } //Serial.println("END"); } //************************************************************************************************* //*************************************************************************************************** void DisplayForecastWeatherh3(int x, int y, int index) { int fwidth = 45;//высота int hor=3*index; const char* h[] = { "0","3","6","9","12","15","18","Ч","Ч","Ч","Ч","Ч","Ч","Ч"}; y = y + fwidth * index; x=x+10; //**************День недели************************* if(hor>0) {display.fillRect(0, y-29 , 10,y+9,GxEPD_BLACK); } else { display.fillRect(0, y-29 , 10,y+9,GxEPD_RED); } display.setFont(); String str = WxForecast[index].Period; // char Buf[20]; // str.toCharArray(Buf, 20); //int hourp = atoi(Buf + 11); int hourp =str[11]-'0'; int hourp1 =str[11+1]-'0'; //int hourp2((str[11]-'0')*10+(str[11+1]-'0')); // Serial.println(hourp2); display.setTextColor(GxEPD_WHITE); display.setCursor(2,y-30+3); display.print(hourp); display.setCursor(2,y-20+3); display.print(hourp1); display.setCursor(2,y-10+3+2); display.print("0"); display.setCursor(2,y-0+3+2); display.print("0"); //********************* DisplayConditionsSection(x+30-3 , y-6 , WxForecast[index].Icon, SmallIcon); display.setTextColor(GxEPD_RED); display.setFont(); display.setTextSize(2); static char outstr[15]; display.setCursor(62,y-24); dtostrf(WxForecast[index].Low,5, 1, outstr); display.print(outstr); display.setTextColor(GxEPD_BLACK); display.setCursor(62,y-4); dtostrf(WxForecast[index].High,5, 1, outstr); display.print(outstr); display.setTextSize(1); display.drawLine(0, y+15, 128, y+15, GxEPD_WHITE);//x1 y1 x2 y2 display.drawLine(10, y+15, 128, y+15, GxEPD_BLACK);//x1 y1 x2 y2 // drawString(x + fwidth / 2, y + 30, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0, 5)), CENTER); // drawString(x + fwidth / 2, y + 125, String(WxForecast[index].High, 0) + "°/" + String(WxForecast[index].Low, 0) + "°", CENTER); }