Hello, I have a project to complete about Smart Stick for Blind People.
I have
-3 ultrasonic sensor,
-3.5 Mm Audio Jack Female,
-9V battery,
-Earphone,
-Stick.
I have to change the three things based on the different scenarios.
Frequency of the sound
Intensity of the beeps
Sides of the Earphone (Left and Right)
-If the obstacle is on the right, then Arduino will send a signal at regular intervals to the only right-side earphone.
-If the obstacle is on the left, then Arduino will send a signal at regular intervals to the only left-side earphone.
-If the obstacle is on the front, then Arduino will send a signal at regular intervals to both sides of the earphone.
-If the obstacle is both on the right and front, then Arduino will send a signal to both sides of the earphone, but the frequency will be different.
-If the obstacle is both on the left and right, then Arduino will send a signal to both sides of the earphone, but the frequency will be different.
-If the obstacle is both on the left and front, then Arduino will send a signal to both sides of the earphone, but the frequency will be different.
Also, the intensity of the sound will increase as the obstacle approaches. (like a car reverse parking sensors)
I generally used 'delay' in my code, but I couldn't simultaneously get a signal from the ultrasonic sensor and send a signal to the earphone because of the blocking code.
Could you help me with my project? Thank you in advance.
Usually you can't with ultrasonic sensor. You need to activate them one after the other with some time in between so that you don't get echos from one into the other.
but that can be "fast enough" for a blind walker...
Well, because you can't do that. Each sensor will hear the pulse or echo from the other device. You just have to know when both sensors have received and echo.
Try the logic of operating each sensor, one after the other and and only then testing to see of both are receiving an echo. If not both, then did either one receive and echo.
It works, but unfortunately, I cannot send signals simultaneously to both sides of the earphone. Only one side gets a signal.. (so, only one side makes a sound)
Actually, it has five connections. One of them is ground, and the other two are Left and Right. ( I use only three pins in the stereo jack and don't know what the rest of them are used for) I have soldered wires to the pins.
That suggests the other two are a switch that opens and closes when you plug into the jack. Your DMM will show the resistance between the two connections is zero with nothing plugged in and infinite resistance when plugged in. OR perhaps not, you need to figure out what you have.