How to identify a particular sound, like the sound of a Vacuum Cleaner?

Hi,

I know how to program in Arduino to distinguish a higher and lower signal intensity accordingly to a threshold.

However, if what I want is identify a particular sound, like the sound of a Vacuum Cleaner, things are more complicated...

// Sound intensity (easy!)
if (analogData > 1023/2) {
  // Do this
} else {
  // Do that
}

// Sound type (hard!)
if (sound(analogData) == "vacuumCleaner") {
  // Do this
} else {
  // Do that
}

How to program in Arduino such that you may identify sounds, like the sound of a Drill or a Car?

You will have to collect an amount of data necessary for an FFT then map frequencies and amplitudes to various sound sources. You best bet is to use something like a PlainDSP board.