ESP32Radio-V2 icon indicating copy to clipboard operation
ESP32Radio-V2 copied to clipboard

Graphic RSSI

Open kondorcl opened this issue 2 years ago • 0 comments

Hi Ed, could you evaluate this code to show rssi graphic signal strenght on the ST7735 display. Arduino IDE 1.8.12 VERSION "Wed, 11 Oct 2023 11:30:00 GMT"

Graphic RSSI

  • Main program lines

177//rssi 178 uint16_t Gcolor; //graphic rssi var 179 int xpos = 128 - 15; //graphic rssi hor pos 180 int ypos = 128 - 18; ////graphic rssi ver pos

3358 adcval ) ; 3359 int rssi = WiFi.RSSI(); 3360 if (rssi < -88) Gcolor = RED; 3361 else if (rssi > -66) Gcolor = GREEN; 3362 else Gcolor = YELLOW; 3363 signalIndicator(rssi, xpos, ypos, Gcolor);

  • bluetft.h 74 bool bluetft_dsp_begin ( int8_t cs, int8_t dc ) ; 75 void signalIndicator (int32_t s, int xpos, int ypos, uint16_t color); 76 #endif

  • bluetft.cpp 143 //************************************************************************************************** 144 // D I S P L A Y R S S I * 145 //************************************************************************************************** 146 void signalIndicator(int32_t s, int xpos, int ypos, uint16_t color) { 147 bluetft_tft->fillRect(xpos, ypos + 12, 2, 3, color);

149 if (s < -88) bluetft_tft->fillRect(xpos + 3, ypos + 9, 2, 6, BLACK); 150 else bluetft_tft->fillRect(xpos + 3, ypos + 9, 2, 6, color);

152 if (s < -78) bluetft_tft->fillRect(xpos + 6, ypos + 6, 2, 9, BLACK); 153 else bluetft_tft->fillRect(xpos + 6, ypos + 6, 2, 9, color);

155 if (s <= -66) bluetft_tft->fillRect(xpos + 9, ypos + 3, 2, 12, BLACK); 156 else bluetft_tft->fillRect(xpos + 9, ypos + 3, 2, 12, color);

158 if (s < -55) bluetft_tft->fillRect(xpos + 12, ypos, 2, 15, BLACK); 159 else bluetft_tft->fillRect(xpos + 12, ypos, 2, 15, color);

161 } 162 /**************************************************************************************************/

Best Regards, ERamirez

kondorcl avatar Oct 23 '23 19:10 kondorcl