Algorithm for Project BAT-eye

A project log for Project BASICS

A concerned effort to improve the basic standard of living in underdeveloped and developing countries.

Debargha GangulyDebargha Ganguly 05/21/2017 at 12:560 Comments

{Repeat these steps every 5 milliseconds}

Step 1- Send pulse to Ultrasonic sensor

Step 2- Measure the time required for the sound

wave to return

Step 3- Calculate the distance to the obstacle based

on the time required for the wave to return, and the

speed of sound

Step 4- Print the distance to the serial monitor

Step 5- Generate a frequency to correspond to the

distance from the obstacle

Step 6- Play a tone on the speaker