Skip to content

Instantly share code, notes, and snippets.

@LuizFelipeLemon
Created November 10, 2017 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LuizFelipeLemon/2d382df9bf4a836866b0a7bedacdd463 to your computer and use it in GitHub Desktop.
Save LuizFelipeLemon/2d382df9bf4a836866b0a7bedacdd463 to your computer and use it in GitHub Desktop.
#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(){
int leitura = analogRead(pot); //Variável que armazena a leitura analógica do pino A5
Serial.println(leitura); //Mostra esta leitura na Serial
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment