// Pin configuration
const int analogPin = 34;  // Using the appropriate analog pin for your Wokwi board

void setup() {
  Serial.begin(9600);  // Initializing serial communication
}

void loop() {
  // Reading the analog sensor input
  int sensorValue = analogRead(analogPin);

  // Converting analog reading to voltage
  double voltage = (double)sensorValue / 1024.0 * 5.0;

  // Converting voltage to temperature in degrees Celsius
  double temperatureC = (voltage - 0.5) * 100.0;

  // Displaying the temperature in the Serial Monitor
  Serial.print("Analog Reading: ");
  Serial.print(sensorValue);
  Serial.print(", Voltage: ");
  Serial.print(voltage);
  Serial.print("V, Temperature: ");
  Serial.print(temperatureC);
  Serial.println("°C");

  delay(1000);  // Delaying for readability, adjust as needed
}