Last active
November 11, 2017 03:20
-
-
Save LuizFelipeLemon/9db8f1123be074ca9617927c8d2c072c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#define pot A5 //Nomeia a porta A5 como pot | |
void setup(){ | |
Serial.begin(9600); //Inicia a Serial | |
pinMode(pot,INPUT); //Define o pino A5 como entrada | |
} | |
void loop(){ | |
float voltage = 0.00489 * analogRead(pot); // Armazenda valor da tensão | |
Serial.print(voltage); // Mostra na Serial | |
Serial.println(" V"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment