#define adc_pin 36
const int led =2 ;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(led,OUTPUT);
}
void loop() {
float adc_val=analogRead(36);
Serial.print("dc value: ");
Serial.println(adc_val );
float voltage =((adc_val* 5)/4095) ;
Serial.print("voltage:");
Serial.print(voltage);
Serial.println(" V");
// put your main code here, to run repeatedly:
delay(3000); // this speeds up the simulation
}