#include <DHTesp.h>
#include <TM1637TinyDisplay.h>
 
const int sensorPin = 15;
 
DHTesp tempSensor;
TM1637TinyDisplay display(14, 12);
 
void setup() {
  Serial.begin(115200);
  Serial.println("Hello, ESP32!");
 
  tempSensor.setup(sensorPin, DHTesp::DHT22);
  display.setBrightness(15);
  delay(100);
}
 
void loop() {
  float temperature =  tempSensor.getTempAndHumidity().temperature;
  String tempString = String(temperature, 0) + "oC";
  display.showString(tempString.c_str());
  delay(10);
}
4-Digit Display