Question.4
What will the following code print to the Serial Monitor if the ADC reads a value of 512?
void setup() {
Serial.begin(115200);
}
void loop() {
int sensorValue = analogRead(A0); // 512
float voltage = (sensorValue / 1023.0) * 5.0;
Serial.print("Voltage: ");
Serial.println(voltage);
while(1);
}