Go Down

Topic: i made a program for creating my tone but not working good (Read 3898 times) previous topic - next topic

maheshs


please help me
does any one know to get alphabets in speaker clearly using

i wanted the speaker to say (mahesh is cool)

i got frequency table here :

http://www.math.cornell.edu/~mec/2003-2004/cryptography/subs/frequencies.html

i wrote this program but it is not working good

my program:
Code: [Select]

int speakerPin = 8;//connected speaker to pin 8
void setup()
{
pinMode(speakerPin,OUTPUT);
}
void loop()
{
tone(speakerPin, 26.1); // m
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 8.12); // a
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 5.92); // h
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 12.02); // e
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 6.28); // s
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 5.92); // h
delay(100);
noTone(speakerPin);
delay(50);
/////////////////////////////////////////////////////////////////////////////////////
tone(speakerPin, 7.31); // i
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 6.28); // s
delay(100);
noTone(speakerPin);
delay(50);
///////////////////////////////////////////////////////////////////////////////////////////
tone(speakerPin, 2.71); // c
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 7.68); // o
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 7.68); // o
delay(100);
noTone(speakerPin);
delay(50);
tone(speakerPin, 3.98); // l
delay(100);
noTone(speakerPin);
delay(50);
}

DavidOConnor

I think your reference is a table of how often those letters appear in written English.

Go Up