EMIC
Newzed
Posts: 2,503
How come - I say, how come, if I tell EMIC
date = 24
serout tx, baud, [noparse][[/noparse]Say "Today is", dec date, "July", eom]
It responds with
"Today is two four July"
instead of
"Today is twenty-four July"
Sid
date = 24
serout tx, baud, [noparse][[/noparse]Say "Today is", dec date, "July", eom]
It responds with
"Today is two four July"
instead of
"Today is twenty-four July"
Sid
Comments
SEROUT Tx, Baud, [noparse][[/noparse]Say, "Today is ", DEC date, " July", EOM]
Notice the spaces after "is" and before "July."·· By the way, 25 July is my birthday....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Happy Birthday, Jon.· I hope our beautiful friend is there to celebrate it with you.
Sid
hours = $15
mins = $30
serout tx, baud, [noparse][[/noparse]say, "The time is ", hex2 hours, ":", hex2 mins, EOM]
the EMIC translation is perfect.· That solves a lot of problems.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I've tried inserting "· " in the EMIC statements but that doesn't do anything.
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
http://www.lightlink.com/dream/chris/alarmsystem.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
have to enter the date in your profile (not done by magic).
Bob
Happy Birthday, Jon
If the date was the 18th or 24th she would say the date correctly.· Today, however, instead of saying "Today is the first of August", she says "Today is the oh one of· August".· How can I get her to day the "first" or the "Second" and so on.· I could do it with if-then loops but that consumes a lot of code space.· I thought perhaps I could add an abbreviation so the she would say· "first" when $01 appeared,·and "second" when $02 appeared.· The problem with that is that I can not figure out to access the list of abbreviations or to add an abbreviation.· I wrote
serout Tx, baud, [noparse][[/noparse]listabbrev, EOM]
and then serout Tx, baud, [noparse][[/noparse]$06, EOM
and the EMIC flashed red briefly but nothing appeared on the screen.· I tried serouting "say, listabbr, EOM" and "say, $06, EOM" but nothing happened.
What am I not doing correctly?
Sid
There is no simple answer for this one; you're going to have to write some code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 8/1/2004 4:21:17 PM GMT
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
That leaves the problem of why can I not display the list of abbreviations.· I know what they are from the documentation but I would still like to be able to list them.
This brings up one more question.· If I want to use the abbreviation for August would I write:
serout Tx, baud, [noparse][[/noparse]say "This is the month of Aug ", useabbr, EOM]
Sid
Text mode commands are covered in the docs, but generally it would look like this:
· say="The BASIC Stamp really rocks!"<CR>
You'll hear the Emic speak, then print "OK" on the terminal. To list the stored abbreviations, you would enter this:
· listabbr<CR>
When using abbreviations, you don't have to do anything special -- just embed them into your stream:
· SEROUT TX, Baud, [noparse][[/noparse]Say, "Today is Aug first.", EOM]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 8/1/2004 6:35:26 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
New Combo LCD Backpack
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office