Skip to content

Instantly share code, notes, and snippets.

@thiagoalz
Created August 14, 2011 04:02
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 thiagoalz/1144555 to your computer and use it in GitHub Desktop.
Save thiagoalz/1144555 to your computer and use it in GitHub Desktop.
Codigo de teste para detectar o pressionar de um botão o aterrando!
bool val2;
void setup()
{
pinMode(2, INPUT);
digitalWrite(2, HIGH);
Serial.begin(9600);
}
void loop()
{
delay(100);
val2 = !digitalRead(2) ;
Serial.println(val2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment