const int tempPin = A0; // pin for temperature sensor
const int lightPin = A1; // pin for light sensor
void setup() {
Serial.begin(9600); // Intialize serial communication at 9600 baud rate
}
void loop() {
int tempValue = analogRead(tempPin); // Read the analog value from temprature
int lightValue = analogRead(lightPin); // Read the analog value from the light
// convert the analog value to temperature in celsius
float temperature = (tempValue * 5.0 * 100.0) /1024.0;
Serial.print("temperature: ");
Serial.print(temperature);
Serial.println("°C");
Serial.print("Light Level: ");
Serial.println(lightValue);
delay(1000); // wait for 1 second before the next reading
}