what are the values of the microphone

For Formula Flowcode Micromouse users to discuss projects, flowcharts, and any other issues related to the Formula Flowcode Micromouse.

Moderator: Benj

Post Reply
tiger30
Posts: 1
Joined: Wed Mar 06, 2013 8:20 pm
Contact:

what are the values of the microphone

Post by tiger30 »

Hello ,
I'm programming my buggy so that it would stop when I clap , the problem is that I don't have the buggy now and can only use it for a small period of time for the project
my question is is the microphone reading 0 when there is no voice and 255 when there is voice ? or is it like the distance sensor 255 is for far objects while 0 is for close ones ?

Another question is how can I produce a sound when turning , I know that If i need to produce a sound I need to use a loop in that case it will keep producing the sound but wont turn . So does any one has a solution for this ? I attached a pic for this part
Attachments
06-03-2013 19-31-29.png
(9.5 KiB) Downloaded 5250 times

User avatar
Benj
Matrix Staff
Posts: 15147
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: what are the values of the microphone

Post by Benj »

Hello,

The microphone is like the distance sensor, the louder the sound the higher the reading will be. You could probably set a threshold value and then tweak the value once you have access to the hardware.

Producing a sound while turning is tricky. Either make the sound very short and inter call the move and play note macros. Or you may be able to use a timer interrupt to generate the sound while the main program moves the robot.

Post Reply