Код:
//**************** ПРОГРАММА ВЫВОДА НА ДИСПЛЕЙ
tft.setFreeFont(FF32);
if ( result0 > 1800000 & result0 < 1930000){tft.setTextColor(TFT_GREEN);} // проверяем границы радиолюбительских диапазонов
else if ( result0 > 3500000 & result0 < 3800000){tft.setTextColor(TFT_GREEN);}
else if ( result0 > 7000000 & result0 < 7200000){tft.setTextColor(TFT_GREEN);}
else if ( result0 > 10100000 & result0 < 10150000){tft.setTextColor(TFT_GREEN);}
else if ( result0 > 14000000 & result0 < 14350000){tft.setTextColor(TFT_GREEN);}
else if ( result0 > 18068000 & result0 < 18168000){tft.setTextColor(TFT_GREEN);}
else if ( result0 > 21000000 & result0 < 21450000){tft.setTextColor(TFT_GREEN);}
else if ( result0 > 24890000 & result0 < 24990000){tft.setTextColor(TFT_GREEN);}
else if ( result0 > 28000000 & result0 < 29700000){tft.setTextColor(TFT_GREEN);}
else {tft.setTextColor(TFT_RED);//если за диапазоном, включаем красный цвет и запускаем постоянное обновление частоты(мерцание)
tft.fillRect(150, 35, 32, 35, TFT_BLACK);
if (millions10>0) {tft.setCursor(150, 68, 2); tft.println(millions10);}
prev_millions10 = millions10;
tft.fillRect(185, 35, 32, 35, TFT_BLACK);
tft.setCursor(185, 68, 2); tft.println(millions1); prev_millions1 = millions1;
tft.setCursor(215, 68, 2);
tft.println(".");
tft.fillRect(230, 35, 32, 35, TFT_BLACK);
tft.setCursor(230, 68, 2); tft.println(thousands100); prev_thousands100 = thousands100;
tft.fillRect(265, 35, 32, 35, TFT_BLACK);
tft.setCursor(265, 68, 2); tft.println(thousands10); prev_thousands10 = thousands10;
tft.fillRect(300, 35, 32, 35, TFT_BLACK);
tft.setCursor(300, 68, 2); tft.println(thousands1); prev_thousands1 = thousands1;
tft.setCursor(330, 68, 2);
tft.println(".");
tft.fillRect(345, 35, 32, 35, TFT_BLACK);
tft.setCursor(345, 68, 2); tft.println(hundreds); prev_hundreds = hundreds;
tft.fillRect(380, 35, 32, 35, TFT_BLACK);
tft.setCursor(380, 68, 2); tft.println(tens); prev_tens = tens; }
//*********если все в норме, работает старый код