Shop OBEX P1 Docs P2 Docs Learn Events
Reading .txt file with BS2 — Parallax Forums

Reading .txt file with BS2

JDM_EP3JDM_EP3 Posts: 3
edited 2004-08-24 18:24 in BASIC Stamp
guys,

i need some help with the commands of BS2..cry.gif
i intend to read .txt files on the BS2 that is recieved via bluetooth (using EB500).. eventually printing out the .txt file..

therefore i need some important commands as in how to program the BS2 to read the .txt file or commands that are relevant and important..

pls help.. would really appreciate any help given..

thanks!!!

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-24 06:45
    The BASIC Stamp is an embedded micro that cannot "read" a text file -- the best you can do is have text data transmitted to it serially and parse the input for specific strings (using the WAIT modifier of SERIN).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • JDM_EP3JDM_EP3 Posts: 3
    edited 2004-08-24 06:46
    so u are saying that i cant send files (for e.g. .txt) to the bs2?

    i only can only send a string to the bs2?
  • shandarshandar Posts: 12
    edited 2004-08-24 13:51
    You can send files, though you will get the binary data, not as a file as a real romputer sees it. But textfiles aren't encoded och compressed in any way so if you send raw text from a bluetooth device to your stamp it should be able to save the text in the EEPROM.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-24 15:07
    You can send anything to the BASIC Stamp, so long as you send it in such a way that the BASIC Stamp can deal with the data you're sending. In another thread you'll find a program called Simple_GPS -- this program shows how the BS2 can process an incoming stream of data (that has a known format).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • JDM_EP3JDM_EP3 Posts: 3
    edited 2004-08-24 18:24
    thanks for the tips guys..

    hope u guys dun mind if i have any more qns in the future..
Sign In or Register to comment.