Logging data to the USB Thumb Drive

I would like to modify SDDataLogger to write to a USB thumbdrive instead of SD card. Is it just a question of changing the filepath?

DannySwarzman:
I would like to modify SDDataLogger to write to a USB thumbdrive instead of SD card. Is it just a question of changing the filepath?

Yes. Since "FILE_APPEND"

 File dataFile = FileSystem.open("/mnt/sd/datalog.txt", FILE_APPEND);

You might need create that file first.

touch /mnt/sd/datalog.txt

change filepath base your system.

http://wiki.openwrt.org/doc/howto/usb.storage

I've been experimenting. Apparently:
File dataFile = FileSystem.open("/mnt/sd/datalog.txt", FILE_APPEND);
will create the file if it isn't there.

It seems the crucial part is :

mount -t vfat /dev/sda1 /mnt/usb

IN the OpenWrt document, there several examples of the mount command.

I'm not sure if the -t vfat part is needed. It applies to my thumb drive because that is how it was formatted. I suppose that other filesystem types are possible.

It seems that /dev/sda1 identifies a device and /mnt/usb is a path associated with that device.

There are still some mysteries. Such has how the directory /mnt/sd is associated with at device and the relationship between the various directories within /mnt.

I will experiment more to clarify these questions. In the meantime, it would be great if someone else who understands this better would respond.