Ok with some tweaking and assistance from the programming section here on the forums I was able to perfect refreshing the certain areas of the screen. After a readout was printed it's value would be saved to a parameter for the next cycle of the loop and before the next readout was printed it would use the parameter to write over the existing readout on screen in black. This doesn't even require a lot of extra coding so it certainly saves space for the bigger portion of my project.
#define cs 10
#define dc 8
#define rst -1
#define DHT11PIN 2
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#include <dht11.h>
dht11 DHT11;
double temp;
int humidity;
Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, rst);
void setup() {
tft.initR(INITR_REDTAB);
tft.fillScreen(ST7735_BLACK);
tft.setCursor(35, 0);
tft.setTextColor(ST7735_RED);
tft.print("o");
tft.setCursor(45, 2);
tft.print("Fahrenheit");
tft.setTextColor(ST7735_BLUE);
tft.setCursor(15, 50);
tft.print("% Humidity");
}
void loop() {
int chk = DHT11.read(DHT11PIN);
tft.setTextColor(ST7735_BLACK);
tft.setCursor(0, 2);
tft.print(temp);
tft.setTextColor(ST7735_RED);
tft.setCursor(0, 2);
tft.print(Fahrenheit(DHT11.temperature));
temp = (Fahrenheit(DHT11.temperature));
tft.setTextColor(ST7735_BLACK);
tft.setCursor(0, 50);
tft.print(humidity);
tft.setTextColor(ST7735_BLUE);
tft.setCursor(0, 50);
tft.print(DHT11.humidity);
humidity = (DHT11.humidity);
delay(5000);
}
double Fahrenheit(double celsius)
{
return 1.8 * celsius + 32;
}