United Kingdom
Asked — Edited

Localised Sound

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


Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

United Kingdom

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.

United Kingdom

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.

United Kingdom

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?



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

United Kingdom

If the sensors work the script would be very simple;

# Script to move towards sound

# Get the values for left and right
$leftchannel = GetADC(ADC0)
$rightchannel = GetADC(ADC1)

# Check the values and move towards sound
IF($leftchannel > $rightchannel)
ELSEIF($rightchannel > $leftchannel)

# Wait 1 second

# Loop back

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

United Kingdom

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.