Go Down

Topic: i made a program for creating my tone but not working good (Read 3982 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy