This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |