hex705

the first creature to discover water was likely not a fish

Internet of Things

Arduino SD — FAT16 — OSX

leave a comment

I have a micro SD card.  I want to use it with an Arduino Yun (or xBee shield).

It needs to be formatted FAT16.  (NOT FAT32 — FAT32 will not mount).

This is a two PART process.  The first part results in a fat32 format using disk utility.  PART two converts to FAT16 via command line (terminal).

PART 1:

Connect card to OSX machine.

Open disk utility.

Click on SD card when it mounts — it will show up in left panel.

Select ERASE from the top RIGHT panel options.

FORMAT: choose MS-DOS (FAT).

NAME:  myDISK (optional — but for clarity use a name).

Click erase (bottom right).

When done, click on the partition you just named.  At bottom of disk utility it will tell you the mount point and ofrmat — it will tell you FAT32.

 

PART one is complete.

 

PART TWO:

 

Open terminal window

at prompt, list file system by typing  :

df -h

You should see a table with  disk and their mount points.  BE CAREFUL one of the disks is your hard drive.  IT IS VERY IMPORTANT THAT YOU DO NOT OVERWRITE YOUR HARD DRIVE.  The next step will reformat the selected disk in an instant!

in the right column you should see a disk with the name you created in PART 1 above (eg. myDISK).  the left most column for this volume is the info we need.

mine say that myDISK can be found at :

/dev/disk1s1

(the numbers after the word disk will likely be different — that’s ok.  It is worth noting that my hard drive is at /dev/disk0s2  <– I do not want to write to this in next step!)

You want to format the disk at /dev/disk1s1 ms_dos fat16.

You need to unmount this disk to format it. (unmount is not the same as eject.)  easiest way — jump back to disk utility, select the disk name you are about to format (ie myDISK) and then click unmount icon at top.

now back to terminal…

at command line, type:

newfs_msdos -F 16 /dev/disk1s1

ie:

newfs_msdos -F 16 /YOUR/MOUNT/POINT

when you click enter it will be done.

Go back to disk utility, mount the disk and look at bottom — it will now tell you that you have a fat16 disk!

 

just like we need for the YUn… and now it mounts!

RESOURCES:

ada fruit support

arduino site

arduino yun forum

 

 

 

Written by hex705

June 29th, 2014 at 1:52 am