//------------------- piezo tone ---------------------
//--- Plays a pitch thru a piezo speaker
// setup: Wire a piezo disk from pin 6 to gnd
//----------------------------------------------------
void setup(){
pinMode(6, OUTPUT); // Set the digital pin as an output
}
void loop(){
tone(6, 440, 200); // syntax: tone(pin, freq, duration)
delay(700); // silence for 500 millisec.
}
|