SHARE
TWEET

Untitled

a guest Jan 21st, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void loop() {
  2.       delay(50);
  3.       // See if an object is in front of us
  4.       int distance = msToCm(ping());
  5.  
  6.       //Serial.println(distance);
  7.       if ( distance < detectionDistance ) {
  8.         // get a random song
  9.         playNote(NOTE_G5, 100, .1);
  10.       }
  11.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top