Help Needed Using Propeller with micro-SD Card Adapter
Juliet Oscar Echo
Posts: 31
New to the forum and this is my first post. I have limited programming experience and need help. My first introduction to programming was the BS2 a few years ago, then a year ago I decided to try my hands at the Propeller.
I'm trying to build an application that saves sensor data to an micro-SD card using the Gadget Gangster Propeller Platform USB with built in micro-SD Card Adapter. Currently I'm using the fsrw object suggested by the product manual to create a comma delimited string that saves to the output.txt file opened on the SD card. The goal is to then import the .txt file to Microsoft Excel for analysis. The problem is the file is just one long string. Is there any way to modify fsrw so it writes a new line to the .txt file when you write a new set of updated sensor data? That way when I import the .txt file into excel it will automatically put it into rows and columns instead of one long row.
The goal is to go from this:
time,var1,var2,var3,var4,time,var1,var2,var3,var4,time,var1,var2,var3,var4,time,var1,var2,var3,var4,time,var1,var2,var3,var4,
to this:
time,var1,var2,var3,var4
time,var1,var2,var3,var4
time,var1,var2,var3,var4
time,var1,var2,var3,var4
The final goal is to fly the propeller with a pressure sensor (Parallax's VTI SCP1000 30-120 kPa Pressure Sensor module) on board a model rocket and retrieve the data for performance analysis.
Thanks
I'm trying to build an application that saves sensor data to an micro-SD card using the Gadget Gangster Propeller Platform USB with built in micro-SD Card Adapter. Currently I'm using the fsrw object suggested by the product manual to create a comma delimited string that saves to the output.txt file opened on the SD card. The goal is to then import the .txt file to Microsoft Excel for analysis. The problem is the file is just one long string. Is there any way to modify fsrw so it writes a new line to the .txt file when you write a new set of updated sensor data? That way when I import the .txt file into excel it will automatically put it into rows and columns instead of one long row.
The goal is to go from this:
time,var1,var2,var3,var4,time,var1,var2,var3,var4,time,var1,var2,var3,var4,time,var1,var2,var3,var4,time,var1,var2,var3,var4,
to this:
time,var1,var2,var3,var4
time,var1,var2,var3,var4
time,var1,var2,var3,var4
time,var1,var2,var3,var4
The final goal is to fly the propeller with a pressure sensor (Parallax's VTI SCP1000 30-120 kPa Pressure Sensor module) on board a model rocket and retrieve the data for performance analysis.
Thanks
Comments
Will you be posting any details on your project?
If you think others would use it, and you want a bit of techno stardom, you can post the code in the OBEX if you want to share it with other tehcno's, ensuring your immortality.
Between the start and end you can get lots of interesting input from other folks on the forums. Most are very knowledgeable and helpful. There's a few examples of "unmitigated cranky old man syndrome", but these are relatively few and far between. Mostly its otherwise fun.
Tell us more about what you are doing. Also check out the SD regression tests in propforth if you want to see an example implementation in forth as an alternative to Spin or C, etc.
Wow, that certainly is an update, I don't think anyone has been hanging on waiting for this news
BTW, I like to preset the size of my file and simply write and flush sectors where a sector is flushed once it becomes full or else after a very short time in the range of milliseconds to seconds. If the data is in ASCII then it is always easy to read and the null at the end of the written data is easy to find and can optionally be used to change the file size in the directory if necessary at read time.
Next we will hear what happened to Amelia Earhart!
That's a great idea. Now all I need to do is find that micro SD card from 8 years ago
Sounds like you have a lot of experience with SD. At what Kbps rate are you able to save data to SD using your flushing technique without having any gaps in data due to the time necessary to write/flush sectors.
I have about 100 bytes of raw data I need to save at 50 Hz (5 Kbps), but I would prefer to save at 100 Hz (10 Kbps) if possible. Data needs to be saved for up to 10 minutes without any gaps. I've pushed SPI with some of my propeller projects at speeds of 6 to 7 Kbps so in theory I'm not too far from my goal of 10 Kbps when saving it in its raw format. If I save the same 100 bytes of data as ASCII characters in a CSV format, I'm probably looking at at least 400 bytes of data at 100 hz (40 Kbps).
As I've gotten older (and hopefully wiser), I've started to appreciate people who don't just disappear from the thread they started once somebody solves their problem. It's always nice to know how the story ends, even when reading a thread that is over 10 years old.