Simple voltmeter using ADC

Solving Approach:

How do you plan to solve it?

 

 

Code

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  int reading = analogRead(A0);
  float voltage = reading * 5 / 1023.0;
  Serial.print("ADC Value: ");
  Serial.print(reading);
  Serial.print(" | Voltage: ");
  Serial.print(voltage);
  Serial.println(" V ");
  delay(200);
}



 

Output

Video

Add video of output (know more)

 

 

 

 

 

Photo of Output

 

 

 

 

 

Upvote
Downvote

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!