Reading data from thumb drive
Hi All,
I'm getting frustrated trying to read data from a USB thumb drive, using the Parallax memstick adapter. I can open, delete·and write, but I can't read. I've tried the "usbdrive" object and imitating the Basic Stamp demo.
With the usbdrive object, is this the proper usage for read?
This always returns 0
I have also tried:
My forehead has "QWERTY" stamped on it. What am I doing wrong?
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
I'm getting frustrated trying to read data from a USB thumb drive, using the Parallax memstick adapter. I can open, delete·and write, but I can't read. I've tried the "usbdrive" object and imitating the Basic Stamp demo.
With the usbdrive object, is this the proper usage for read?
byte usbData[noparse][[/noparse]14] thumb.read($01,@usbData)
This always returns 0
I have also tried:
temp := read_byte
PUB read_byte: fileData | temp
thumb.rxflush
thumb.str(string("RDF "))
thumb.tx($00)
thumb.tx($00)
thumb.tx($00)
thumb.tx($01)
thumb.tx(CR)
fileData := thumb.rx
repeat until temp == CR
temp := thumb.rx
RETURN
My forehead has "QWERTY" stamped on it. What am I doing wrong?
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
