Community
cancel
Showing results for 
Search instead for 
Did you mean: 
bbro
New Contributor I
904 Views

Preparing an SD card for a data file to be read by an Arduino sketch

Jump to solution

From a previous discussion, I successfully put a standard Yocto image on my SD card which allows me to use my Gen2 Galileo as an Arduino. The blink and wifi example sketches work great. So now I want to experiment with reading a data file. So do I simply create a comma delimited text file on the same SD card along side the other five Yocto image files or what?

Thanks

RoboBill

1 Solution
FTinetti
Honored Contributor I
69 Views

Hi RoboBill,

I assume by

RoboBill wrote:

From a previous discussion, I successfully put a standard Yocto image on my SD card which allows me to use my Gen2 Galileo as an Arduino.

you meant the one described at http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000006416.html SD Card Setup and Sketch Persistent for Boards and Kits, right?

RoboBill wrote:

So now I want to experiment with reading a data file. So do I simply create a comma delimited text file on the same SD card along side the other five Yocto image files or what?

If you want to read that file from a sketch then the answer is yes. Take into account, however, you will see the file in the place where the SD card filesystem is mounted in this Linux, which usually is

/media/mmcblk0p1

i.e. if you create a file test.txt in the SD card it is going to be readable from a sketch as

/media/mmcblk0p1/test.txt

as a regular file, actually, using (Linux) regular file operations.

HTH,

Fernando.

View solution in original post

2 Replies
FTinetti
Honored Contributor I
70 Views

Hi RoboBill,

I assume by

RoboBill wrote:

From a previous discussion, I successfully put a standard Yocto image on my SD card which allows me to use my Gen2 Galileo as an Arduino.

you meant the one described at http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000006416.html SD Card Setup and Sketch Persistent for Boards and Kits, right?

RoboBill wrote:

So now I want to experiment with reading a data file. So do I simply create a comma delimited text file on the same SD card along side the other five Yocto image files or what?

If you want to read that file from a sketch then the answer is yes. Take into account, however, you will see the file in the place where the SD card filesystem is mounted in this Linux, which usually is

/media/mmcblk0p1

i.e. if you create a file test.txt in the SD card it is going to be readable from a sketch as

/media/mmcblk0p1/test.txt

as a regular file, actually, using (Linux) regular file operations.

HTH,

Fernando.

View solution in original post

bbro
New Contributor I
69 Views

HI Fernando,

The discussion I was referring to was one of my own http://https//communities.intel.com/thread/97422?sr=inbox&ru=571031 Getting wifi sketch to recognize Galileo wifi.

So yes everything worked fine. I put a blank test.txt file on the SD card and compiled the ReadWrite.ino file without any changes.

Many thanks,

RoboBill

Reply