What is SMD Piezo Transducer?

I received this sensor CET12A 3.5 SMD Piezo Transducer in a starter pack and I don't know what it does or how to use it. Can you give me some pointers or projects that demonstrate its capabilities?

Thanks!

Use it as a small speaker to get sound out of your arduino.

Thanks! I managed to make it work! :slight_smile:

This is the sketch I used.

void setup()  { 
  // declare pin 9 to be an output:
  pinMode(9, OUTPUT);
  beep(50);
  beep(50);
  beep(50);
  delay(1000);
} 

void loop()  { 
  beep(200); 
}

void beep(unsigned char delayms){
  analogWrite(9, 20);      // Almost any value can be used except 0 and 255
                           // experiment to get the best tone
  delay(delayms);          // wait for a delayms ms
  analogWrite(9, 0);       // 0 turns it off
  delay(delayms);          // wait for a delayms ms   
}

Have you looked at: tone() http://arduino.cc/en/Reference/Tone example: tone(9, 2048, 1000);

Thanks! Really good one. :)