All submissions

Simple voltmeter using ADC

Solving Approach:

How do you plan to solve it?

 

 

Code

const int analogPin = A0;

void setup() {
  Serial.begin(9600);
  Serial.println("Simple Voltmeter - Ready!");
}

void loop() {
  
  int analogValue = analogRead(analogPin);
  
  float voltage = (analogValue * 5.0) / 1024.0;
  

  Serial.print("ADC Value: ");
  Serial.print(analogValue);
  Serial.print(" | Voltage: ");
  Serial.print(voltage, 2);
  Serial.println(" V");
  
  delay(500); 
}



 

Output

Video

Add video of output (know more)

 

 

 

 

 

Photo of Output

Add a photo of your hardware showing the output.

 

 

 

 

Submit Your Solution

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