Hi guys, my name is Scott. I'm working on a project in which the I use four sonar sensors (SR04) to detect objects from 0 to 3 meters away and output an audio cue for blind users to hear and possibly avoid them. The project is still very much in it infant state, and right now I'm trying to set my buzzer to buzz with different pattern depend on the parameter. For example 0 buzz if the object is farther than 3 meters. 1 for the object between 1.5 and 3, two buzzes for 1 to 1.5 and three buzzes for 0 to 1 m. I'm using newPing() and newTone(). To create a beeping noise, my buzzer needs to be on and off and delay for a period of time, but this mess up my program because my sonars depended on very precise timing. Is there a way for me to create beeping noise without using delay() function? thanks
sensor_array.ino (2.86 KB)