Simple voltmeter using ADC

Solving Approach:

How do you plan to solve it?

Read the along voltage from A0

Convert to the voltage

 print on the serial port

Code

/*Paste your code here*/
void setup() {
  Serial.begin(115200);
}
void loop() {
  int val = analogRead(A0);
  float volatge = (val)*(5.0/1023.0);
  Serial.println(val); // prints 0 to 1023 
  delay(100);
}


 

Output

Video

Add video of output (know more)

 

 

 

 

 

Photo of Output

Add a photo of your hardware showing the output.

 

 

 

 

Upvote
Downvote

Submit Your Solution

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