HelloI'ts the first time i use the arduino board, and i'm having troble programming.I'm tying to make a sounddetector.I have a input signal, from a mic, that signal is wery low, like 0.1 to 0.3V, what i'm trying to do, is that tre LED should light up, depending on how big to signal in the input is.I've been trying a lot of things, but nothing i do seems to work right. some times, the LED' is on constantly, on some time it doesn't light at all..I'm Despered, PLEASE HELP ME...

Make a sketch that just prints the output from your microphone so you can see what values you are getting. In that way you will know what value to set the LED on / LED off threshold.Also if it's straight from a microphone you are feeding AC into a DC input. Connect the microphone through a capacitor to the input. Then connect two resistors to the input (10K or so it doesn't matter much). Connect the other ends to 5V and 0V. In that way you will get a signal centred around a reading of 512, your threshold can then be just above this value.Also once the LED is on put in a small delay to keep it on until you look at the input again.

i alread have done that, i have readed the value of from the output, on the end that i should put in the input, it is 0.1V 0.2V and 0.3V, but my teacher says that, it was the programming that went wrong... but he still cant figure out how to use the program....

can somebody please tell me how to progam the board to get the LED to react on the microphone signal...PLEASE

• Upload doesn't work? Do a loop-back test.• There's absolutely NO excuse for not having an ISP!• Your AVR needs a brain surgery? Use the online FUSE calculator.• My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...• Microsoft is not the answer. It is the question, and the answer is NO!

What Grumpy Mike and Mem are trying to help you with is to print the values you are measuring out to the serial port. In order for you to see anything, you need to ask your computer to show you what the Arduino is sending it.

In the IDE (the software on your computer you use to send your programs to the Arduino) there is a row of buttons you must be using for this. There is one to compile, one to save and one to send the program to the Arduino. After that, last button on the right, there is one called serial monitor.

Try clicking on the serial monitor button just after you have sent Mem's code to your Arduino, and hopefully after a little wait you should see some numbers appearing in a new window. These numbers are the data measured by your Arduino.

Once this works, please tell us what those numbers are (an average value is fine, we don't need hundreds of samples).

thanks, BUT i dont know what i am doing wrong, because,when the i put the input in, the readen value i 0...but when i take it out the numbers go to 200 to 300...and when i take the microphones ground off, the numbers go to 1023...is it my microphones connection, to the other components that is wrong

It's normal to get a floating value if there is nothing connected to the pin when you read it (i.e. when you disconnected your microphone), so that is nothing to worry about. Odd values in the absence of a ground connection are also normal.

If you have a potentiometer (a variable resistance with a knob you turn to change the value), you could try to connect one end of it to 5V, the other to ground (the same ground as your Arduino) and to put the middle connection (the one with the changing value) to your microphone input.

You should be able to see the value in the serial monitor, with Mem's code running, go from nearly 0 to nearly 1023 as you turn the knob.

If you do not have a potentiometer, you can try the same thing with various pairs of resistors in series... something called a voltage divider.