// CW ID Sketch by KB1UIF A.Tedds. // WARNING pulsed 5volt DC output!!! // Using the functions // tone (OutputPin,Frequency,Duration) // delay (Milli-Seconds) // Output on pin 8 and ground. !!!Warning pulsed 5volt DC output!!! void setup() // put your setup code here, to run once: { //Set Pin 8 as Output. pinMode(8, OUTPUT); //WARNING 5v Pulsed DC output!!! } //void for each letter or number. //Timing looks wrong but it works!! void d() { tone(8,900,150); delay(200); tone(8,900,50);; delay(100); tone(8,900,50); delay(350); } void e() { tone(8,900,50); delay(350); } void k() { tone(8,900,150); delay(200); tone(8,900,50); delay(100); tone(8,900,150); delay(350); } void b() { tone(8,900,150); delay(200); tone(8,900,50);; delay(100); tone(8,900,50); delay(100); tone(8,900,50); delay(350); } void one() { tone(8,900,50); delay(100); tone(8,900,150); delay(200); tone(8,900,150); delay(200); tone(8,900,150); delay(200); tone(8,900,150); delay(350); } void u() { tone(8,900,50); delay(100); tone(8,900,50); delay(100); tone(8,900,150); delay(350); } void i() { tone(8,900,50); delay(100); tone(8,900,50); delay(350); } void f() { tone(8,900,50); delay(100); tone(8,900,50); delay(100); tone(8,900,150); delay(200); tone(8,900,50); delay(350); } //Void loop will repeat forever. void loop() { //call each void in turn. d(); e(); k(); b(); one(); u(); i(); f(); //two second delay for testing. delay(2000); }