Shop OBEX P1 Docs P2 Docs Learn Events
Emic interface — Parallax Forums

Emic interface

LarsLeifLarsLeif Posts: 4
edited 2006-11-14 00:06 in BASIC Stamp
I just got the emic text to speech module but i'm having a hard time finding good documentation for they code as far as the interface and actual workings of it. I've tried just playing around with the code myself and i havn't had much luck.
Anybody know if theres a good resource for it out there? or maybe somebody could post the bare bones for me!
Thanks any help would be great!

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2006-10-27 04:28
    Did the demo program included with the EMIC work okay for you? Which samp are you using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • LarsLeifLarsLeif Posts: 4
    edited 2006-10-27 16:47
    I have the basic stamp 2 and ya the demo program worked fine but when i try to edit the code it gives me errors i cant seem to fix but thats not so much the issue, because i'm pretty sure i'm just coding it wrong. if knew what elements of the code to change and how it would be simple but i dont know know those so i think i'm probably changing something the wrong way
  • dandreaedandreae Posts: 1,375
    edited 2006-10-27 17:49
    Can you post your code in a .bs2 file?· Also explain what you are trying to do.

    Thanks,

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
  • LarsLeifLarsLeif Posts: 4
    edited 2006-11-10 17:39
    well i havn't written my own code as of yet because what i did failed horribly. however what i am trying to do is use a conditional IF statement to make the emic choose what to say based on some inputed value from another sensor
  • Roger PiersonRoger Pierson Posts: 62
    edited 2006-11-10 18:38
    Have you looked over the documentation at the bottom of this page?

    www.parallax.com/detail.asp?product_id=30006

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Roger Pierson
    Senior Electronics Technicain
    DTI Assoicates
  • LarsLeifLarsLeif Posts: 4
    edited 2006-11-12 17:27
    i have looked at the documentation but the way they have the program set up u have to use the menu style interface where u type the first letter and it does the commang. I'd like to start by building a more single command based thing where instead of having options i just type something like "say: "I run fast" " into it and it just says it that way i could just drop it into an if statement no hassle
  • Roger PiersonRoger Pierson Posts: 62
    edited 2006-11-13 23:10
    The problem your going to run into is that the Stamp doesn't handle strings all that well. If you use DEBUGIN to type "I run fast", what will you do with this data? Your only option is to store it in a byte array. Then you would have to do a byte-by-byte comparison on the contents of the array to determine what the user input and if it added up to something meaningful to your program.

    For instance you can't simply write:
    If UserInput = "I run fast" goto Somewhere
    



    The contents of your user input variable would be 73, the ASCII code for "I"


    In the EMIC demo program, the user types a single character. The program then uses a lookup table to translate that character into a unique number that can be used in another lookup table to find the starting point of the appropriate phrase in eeprom. The text is then transfered byte-by-byte from eeprom to the Emic.

    Regardless of what you are trying to do, if your program relys on user input, it will have to work in a similar fashion. If you try to avoid using the eeprom you will quickly run out of variable space by using large byte arrays.

    Hope this helps,

    Roger

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Roger Pierson
    Senior Electronics Technicain
    DTI Assoicates

    Post Edited (Roger Pierson) : 11/13/2006 11:17:51 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-14 00:06
    Lars,
    ·
    ·· This is actually being brought up in another thread as well…There is no reason you can’t place the individual bytes into an array and read them out serially from the array.· To the EMIC there is no difference in whether or not it is a string or an array of bytes.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.