#include #include #include // Graphics and font library for ST7735 driver chip #include //#include #define TFT_BLACK 0x0000 // black #define ONE_WIRE_BUS 25 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h void setup(void) { tft.init(); tft.setRotation(3); Serial.begin(9600); sensors.begin(); } void loop(void) { Serial.print(" Requesting temperatures..."); sensors.requestTemperatures(); // Send the command to get temperature readings Serial.println("DONE"); delay (1000); tft.fillScreen(TFT_YELLOW); tft.setCursor(20, 0, 2); tft.setTextColor(TFT_BLUE,TFT_YELLOW); tft.setTextSize(3); tft.println("Temperature is: "); tft.setCursor(60,180, 2); tft.setTextColor(TFT_BLUE,TFT_YELLOW); tft.setTextSize(3); tft.println("Degrees C "); tft.setCursor(40, 75, 4); tft.setTextColor(TFT_BLUE,TFT_YELLOW); tft.setTextSize(4); tft.println(sensors.getTempCByIndex(0)); delay(2000); }