Skip to content

Instantly share code, notes, and snippets.

@BinarySpoon
Last active November 13, 2020 01:35
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 BinarySpoon/4aa17f77489919bb761a83c1f8aaf815 to your computer and use it in GitHub Desktop.
Save BinarySpoon/4aa17f77489919bb761a83c1f8aaf815 to your computer and use it in GitHub Desktop.
// Pins Used -->
#define Trig 6
#define Echo 7
#define MA 7
#define Y_LED 8
// Declaring Variables -->
int measurements[MA];
int closest_dist;
int min_distance = 2;
// Sensor setup -->
LiquidCrystal MyLCD(12,11,5,4,3,2); // SETUP LCD //
UltraSonicDistanceSensor DIST_SENS(Trig, Echo); // SETUP SENSOR //
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment