Skip to content

Instantly share code, notes, and snippets.

View TeamBlackFlyingRobots's full-sized avatar

TeamBlackFlyingRobots

View GitHub Profile
const int buttonPin = 2; // microswitch analog pin #
const int ledPin = 11; // LED digital pin #
const int pwPin = 10; // pulse width mod pin for sonic rangefinder
int buttonState = 0; // is switch HIGH or LOW?
int sonicRangeFinderDistance = 50; // see end of loop()
// quantity of values to find the median (sample size). Needs to be an odd number
int arraysize = 9;