Pages: [1]   Go Down
Author Topic: i made a program for creating my tone but not working good  (Read 3668 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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:
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);
}
Logged

NY
Offline Offline
Sr. Member
****
Karma: 44
Posts: 398
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: