Making EMIC translate properly to English
Hi Everyone!!
Me Again. Started playing around with EMIC and trying to make a talking clock......Well I have this problem, it seems EMIC does not like Hours!!!!
SEROUT Tx, Baud, [noparse][[/noparse]say, "The time is " , DEC1 hours , HEX2 MINUTES ,"··· And·· ", HEX2 SECONDS·· , "· Seconds· " ,eom]
With the above, Statement and the time being 1:30:15 seconds, EMIC wants to say 100 instead of one. ( I am using DEC1 just to drop the "0" os 01.....
Any Help would be appreciated.....I did try various spacing etc, but either got EMIC to anouce every number or 100.
Yes Me Again
Guido
Me Again. Started playing around with EMIC and trying to make a talking clock......Well I have this problem, it seems EMIC does not like Hours!!!!
SEROUT Tx, Baud, [noparse][[/noparse]say, "The time is " , DEC1 hours , HEX2 MINUTES ,"··· And·· ", HEX2 SECONDS·· , "· Seconds· " ,eom]
With the above, Statement and the time being 1:30:15 seconds, EMIC wants to say 100 instead of one. ( I am using DEC1 just to drop the "0" os 01.....
Any Help would be appreciated.....I did try various spacing etc, but either got EMIC to anouce every number or 100.
Yes Me Again
Guido
Comments
You need space or punctuation between the numbers that you want to be pronounced separately. The way you have it, the hours and the minutes arive at the EMIC as the string "130", so it is no wonder it says "hundred". Send it "1 30" or "1, 30" so it will parse it into two numbers. Use HEX instead of HEX2 and it will drop the leading zeros.
SEROUT Tx, Baud, [noparse][[/noparse]say, "The time is ", HEX hours , ", ", HEX minutes, " And ", HEX seconds, " seconds" ,eom]
Note that hours (hrs), minutes (mins) and AM and PM are in the standard abbreviation dictionary.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Thank you very much for your help! I do understand now how to sperate the string.....I did have to change a little to give the EMIC a little delay to speak the phrase.....Here is what I came up with!
SEROUT Tx, Baud, [noparse][[/noparse]say, "The time is " , HEX hours ,", ", HEX MINUTES· ," And· ", HEX SECONDS· , "· Seconds·· " ,eom]··
I do realaixe that the EMIC has preprogrammed words, but I have not got there yet. Now all I have to do is figure out how to make the clock a 12 hour clock and add the AM/PM bit.......Being new and playing around when I get a chance is great! I really appreciate everyones help.
Thank You Again Tracy
Guido