Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Memory Card, writing data to SD — Parallax Forums

Propeller Memory Card, writing data to SD

Michael PirieMichael Pirie Posts: 1
edited 2013-10-09 21:41 in Propeller 1
Just started working with the Propeller Memory Card. I'm trying to wring a string to the SD card but I can't get a long to appear with the rest of the string.
I'm using the SD-MMC_FATEngine.spin
The string is meant to communicate with MegunoLink. Here is the PUB

PUB MegunoString (data, seriesName)
{ Create a string for MegunoLink to read and generate a time plot from
  data: type long, sample data from an external sensor
  seriesName: type string, the title for the line that MegunoLink will plot to represent the data
}
  SD.writeString(@_timePlot)
  SD.writeString(@_channel_1)
  SD.writeString(@_data)
  SD.writeString(seriesName)
  SD.writeString(@_t)
  SD.writeData(@data, 4)
  SD.writeString(@_endPlot)

SD.writeData(@data, 4) is the line I'm having trouble with, I either get blank spaces or jibberish for this portion of the string output.
Here is a sample of the output I'm currently getting.
{TIMEPLOT:Altitude|data|Sensor Altitude|T|]  }
and this is what I expected
{TIMEPLOT:Altitude|data|Sensor Altitude|T|]345}

thx in advance for help
Sign In or Register to comment.