Jaychadw
United Kingdom
Asked
— Edited
i was wondering if anyone had any knowledge of adding localised sound. Basically, i want my robot to know from what direction sound has come from
There is already a control which can do that for 2 channels.
Sound movement will listen on 2 microphones and move or run a script depending on the direction of sound. Also, Sound Script - although I just checked the tutorial page for it and it is apparently not working.
found this thread from a while ago but Rich beat me to it
synthiam.com/Community/Questions/2798
ah rite thanks guys. Would 2 mics, or sounds sensors be better? Just read that post and now i'm going to look in the builder. Ideally though, i'd like to figure out how to do it in C#. Although, from the general principles already stated in the other thread it should be fairly easy.
You can use two of these: http://www.ebay.com/itm/audio-sound-detector-module-with-sensitivity-adjustment-For-Arduino-circuits-/180991440945?pt=LH_DefaultDomain_0&hash=item2a23ee3831
And connect them to two ADC ports.
write a very short script that reads the ADC port and turns toward the highest value.
Net been down just got back.
@DJ That was just what I was looking at. Excellent thank you again.
Do you think, if I use 4 ( 2 at the sides, one at the front and one at the back ) it would give a good all round detection?
@Jaychadw
Was wondering if you where able to get the sound detectors to work for you. If so, would you mind sharing the script? It might not work exactly for me but I should be able to adapt it for what I want.
Thanks ... Herr Ball
If the sensors work the script would be very simple;
Obviously change the code in the if nest if you want it to do something other than turn towards the sound for half a second and then move forwards.
@ Rich
As always Rich thanks for your help. Will give it a try later tonight and see whats what. Going to try and attempt to have my robot turn its head right or left towards the sound.
I have taken a basic logic programming class and now believe I can make it go with what you gave me. If not you'll hear from me again ... LOL
I have been looking at scripts now and very surprised how many are just basic code using the EZ-Script Functions. I'm I right here or not?
Herr Ball
Yep you are right. DJ has done a great job with EZ-Script and it's simplicity.
The hardest part of any script I've written is the typing
Yeah I have to say, as far as programming goes, it's pretty simple as well as powerful. It almost seems like a custom version of Visual Basic or C#. The Aruino and Processing languages aren't too bad but, EZ is aptly named.