This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Read/write file to LM5 connected USB
#1
Hello, I am working with the logic machine 5 and I want to do a test of reading and writing files through a USB, but the example I find is focused on linux, does it work with windows? Or does it have a different syntax?
Another question, this code


- create usb mount directory
The.execute ('mkdir -p / mnt / usb')
 
- find first matching usb storage device
Dev = io.readproc ('ls / dev / sd * 1 2> / dev / null'): match ('/ dev / sd% l1')
 
- found it, mount
If dev then
The.execute ('mount' .. dev .. '/ mnt / usb')
Alert ('[usb-mount] mounted% s', dev)
- nothing found, local flash will be used
Else
Alert ('[usb-mount] no device found')
End


Hurt directly in the script or would relate to common functions?
Thank you.
Reply


Messages In This Thread
Read/write file to LM5 connected USB - by Rodriguez - 16.03.2017, 17:30

Forum Jump: