Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Created June 18, 2012 19:09
Show Gist options
  • Save jonmarkgo/2950131 to your computer and use it in GitHub Desktop.
Save jonmarkgo/2950131 to your computer and use it in GitHub Desktop.
Sonar config
const int sonarPin = 5; //digital pin your sonar sensor is plugged into
long pulse, inches, cm;
void setup() {
//...
pinMode(sonarPin, INPUT);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment