Skip to content

Instantly share code, notes, and snippets.

@chad
Created August 17, 2008 21:31
Show Gist options
  • Save chad/5834 to your computer and use it in GitHub Desktop.
Save chad/5834 to your computer and use it in GitHub Desktop.
int switchPin = 8;
void setup()
{
Serial.begin(9600);
pinMode(switchPin, INPUT);
}
void loop()
{
Serial.print(digitalRead(switchPin));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment