Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop() {
- delay(50);
- // See if an object is in front of us
- int distance = msToCm(ping());
- //Serial.println(distance);
- if ( distance < detectionDistance ) {
- // get a random song
- playNote(NOTE_G5, 100, .1);
- }
- }
Add Comment
Please, Sign In to add comment