Shop OBEX P1 Docs P2 Docs Learn Events
Help with EMIC Code — Parallax Forums

Help with EMIC Code

GuidoGuido Posts: 195
edited 2006-10-27 04:15 in BASIC Stamp
Is there a means to use a lookup table and enter the results into the EMIC String?

LOOKUP Day-1,[noparse][[/noparse]Sun,Mon,Tue,Wed,Thu,Fri,Sat],Idx
GOSUB PrintIt

The Results, I would like to be placed in this string: SEROUT Tx, Baud, [noparse][[/noparse]Say, "Today is ",·??????········ ,"Day",EOM]
Thank You

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2006-10-27 04:15
    The string sent to the EMIC does not have to be one SEROUT command. Here it is constructed in sequence...

    days DATA "SunMonTueWedThuFriSat"  ' string stored in eeprom
    SEROUT Tx, Baud, [noparse][[/noparse]Say, "Today is "]
    FOR idx=0 TO 2
      READ day*3 + days + idx, char   ' retrieve 3 char string from eeprom
      SEROUT Tx, Baud, [noparse][[/noparse]char]
    NEXT
    SEROUT Tx, Baud, [noparse][[/noparse]"Day",EOM]
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.