Shop OBEX P1 Docs P2 Docs Learn Events
Downloading stored data from an SD card with out removing the card. — Parallax Forums

Downloading stored data from an SD card with out removing the card.

dodgerdodger Posts: 37
edited 2009-02-22 16:16 in Propeller 1
Hello

I am looking for any ideas on how to extract data from an sd card with our having to remove it. I am storing rpm data from a shaft on an SD card.· The propeller and the sd card are inside a water tight enclosure and its impractical to open it everytime we need to see the data stored on the SD.· We are considering buying a underwater connector to make data extraction easier any objects out there to do this?


Thanks,
·

Comments

  • Jay KickliterJay Kickliter Posts: 446
    edited 2009-02-22 15:13
    The fsrw object already has the methods needed to do this. If you can get a serial link from the box to your computer, just open the file and do something like:

    fsrw.popen("shaftdat", "r")
    [b]repeat[/b] [b]until[/b] (theByte := fsrw.pgetc) == -1
      serial.tx(theByte)
    
    
    



    This will dump the entire contents of the file over the serial line. Is that what you need?

    Post Edited (Jay Kickliter) : 2/22/2009 3:29:05 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-22 15:26
    To extend Jay's comment ...

    You won't find any existing objects to do this for you since the format of the information and the structure of the underlying program is so variable. I have seen partial XMODEM and KERMIT implementations in Spin, but they would require some work on your part.

    Here's a link to some XMODEM code: http://forums.parallax.com/showthread.php?p=595861. It's for going the other way (from PC to Prop)

    Maybe some others can chime in with links to other XModem, YModem, or Kermit implementations in Spin posted in forum threads.
  • Jay KickliterJay Kickliter Posts: 446
    edited 2009-02-22 15:33
    Mike's right, if you are storing your data as binary, it would probably be easier to send it using one of the methods he suggested. But if it is stored as ascii CSV, they really aren't necessary, but still convenient. It also depends on your file sizes. If you want to keep it simple as possible, you might be able to get away with uploading the strings and cutting and pasting out of a serial terminal. That's basically what I do , and my computer program parses the CSV lines on the fly.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-22 16:16
    If you want to implement Xmodem there is also the other side. (Prop to PC) & (PC to Prop)
    in PropCOMM

    Ray wrote a program to Ymodem application for uploading/downloading,etc to a Prop
    from a serial terminal. It is here

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
Sign In or Register to comment.