Shop OBEX P1 Docs P2 Docs Learn Events
Emic module to read varible? — Parallax Forums

Emic module to read varible?

TomvnTomvn Posts: 103
edited 2009-10-01 21:11 in BASIC Stamp
·Hi all, anyone have do the project to use the Emic text to speech to read temperature data?

Comments

  • dev/nulldev/null Posts: 381
    edited 2009-10-01 09:54
    Yes it works fine... Emic can pronounce numbers very well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • TomvnTomvn Posts: 103
    edited 2009-10-01 13:41
    Hi dev, you have sample code? i can the make it read the text but have no idea how to make it read variable.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-01 13:47
    The sample code that comes with the EMIC documentation shows how to get it to say numbers like "65". Since you're sending text to the EMIC with a SEROUT statement, you can use all the features of the SEROUT statement including the ability to take the value of a variable and convert it to displayable form like "65". Read the chapter in the manual on the SEROUT statement for examples and the appendix on the formatters (like DEC).
  • dev/nulldev/null Posts: 381
    edited 2009-10-01 14:41
    tmp is a Byte variable:

      IF Sign = 1 THEN
        SEROUT EmicTx, Baud, [noparse][[/noparse]$00,"Temperature, minus ", DEC tmp, " degrees.",$AA]
      ELSE
        SEROUT EmicTx, Baud, [noparse][[/noparse]$00,"Temperature ", DEC tmp, " degrees.",$AA]
      ENDIF
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • TomvnTomvn Posts: 103
    edited 2009-10-01 15:37
    Thanks Mike , Dev
    i will try it tonight.
  • TomvnTomvn Posts: 103
    edited 2009-10-01 16:20
    Hi Dev , what the $00 and $AA mean?
    ·or $00 that is Say and $AA is EOM that right DEv.

    Post Edited (Tomvn) : 10/1/2009 4:25:25 PM GMT
  • dev/nulldev/null Posts: 381
    edited 2009-10-01 21:11
    $00 tells the EMIC that the next bytes should be spoken. $AA, or EOM, means End-Of-Message.
    The documentation for the EMIC is pretty good, take a look at it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
Sign In or Register to comment.