Created
October 17, 2019 01:15
-
-
Save deviceplususer/28a364e709ac99dc5b2c02d56e6b11c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int VOL_PIN = A0; | |
void setup(){ | |
Serial.begin( 9600 ); | |
} | |
void loop(){ | |
int value; | |
float volt; | |
value = analogRead( VOL_PIN ); | |
volt = value * 5.0 / 1023.0; | |
Serial.print( "Value: " ); | |
Serial.print( value ); | |
Serial.print( " Volt: " ); | |
Serial.println( volt ); | |
delay( 500 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment