greiman / usbfat Goto Github PK
View Code? Open in Web Editor NEWArduino FAT32/FAT16 library for USB drives.
Arduino FAT32/FAT16 library for USB drives.
sir im using your usbFat library with usb host shield but getting key.begin error . In usb host library i can get my drive information
Hello,
First, thanks for so great work!
But I can't use the library. Whatever the example code I run, key.begin() fails . And I couldn't find any suggestion in the documentation... Have you already met/heart that issue ? Have you any idea of what's going wrong / what I can do to figure it out.
Thanks for hep!
Antoine
Hello,
I work for LulzBot, a maker of fully open-source 3D printers. We would like to incorporate code from the USB Host Shield into the Marlin firmware for 3D printers. This would allow printers to read USB Flash Drives rather the SD cards. The company I work for is a great believer in open-source and we would donate all our integration work to the open-source and 3D printing community.
However, the USB Host Shield was released under "GPL v2" rather than "GPLv2 or later", which would preclude integration with Marlin, which is released under the "GPL v3".
I have already reached out to the developers of that library and they have agreed to change their license from "GPL v2" to "GPL v2 or later" in order to resolve this issue. The reason why this is necessary is listed here.
I am reaching out to you because I would like to be able to include the modifications you have made that allow USB flash drives to mount faster. For me to be able to do so, I would like to know whether you would be on board with the license change from "GPL v2" to "GPL v2 or later".
Please refer to the original thread here for the discussions related to this:
felis/USB_Host_Shield_2.0#364 (comment)
Thank you!
-- Marcio
I was wondering if it's possible anyhow to disconnect and reconnect the usb stick from the USB Host Shield without restarting the arduino.
I tried putting the initialization in the loop, but I'm unable to open a file after the usb stick is disconnected and reconnected.
hello :)
I tried to run UsbFatDemo example and got this compilation error:
Arduino:1.8.13 (Windows Store 1.8.42.0) (Windows 10), board:"Arduino Mega ADK"
C:\Users\hoday\AppData\Local\Temp\ccOlzTjz.ltrans0.ltrans.o: In function `ls':
sketch/FatFileSystem.h:185: undefined reference to `FatFile::ls(Print*, unsigned char, unsigned char)'
C:\Users\hoday\AppData\Local\Temp\ccOlzTjz.ltrans0.ltrans.o: In function `open':
sketch/FatFile.cpp:395: undefined reference to `FatFile::parsePathName(char const*, fname_t*, char const**)'
sketch/FatFile.cpp:402: undefined reference to `FatFile::open(FatFile*, fname_t*, unsigned char)'
sketch/FatFile.cpp:410: undefined reference to `FatFile::open(FatFile*, fname_t*, unsigned char)'
collect2.exe: error: ld returned 1 exit status
exit status 1
it seems like several functions were declared but not implemented.
I cant just delete declerations because those functions are called inside the code..
Any advice?
Hi, I have on Arduino Mega project two storage media, USB and SD card.
If I compile project, I get this error message
In file included from Z:\EKOKROK\11_TPV\01 ELEKTRO\05 Výrobné podklady Arduino Nextion a RPI\Riadiace jednotky\Arduino Basic Profi (Nové)\02_VÝVOJOVÁ_VERZE\Program_profi\Program_profi.ino:10:0:
C:\Users\j.jirutka\Documents\Arduino\libraries\UsbFat/UsbFat.h:43:37: error: expected class-name before '{' token
class UsbFat : public FatFileSystem {
^
C:\Users\j.jirutka\Documents\Arduino\libraries\UsbFat/UsbFat.h: In member function 'bool UsbFat::begin(uint8_t, uint8_t)':
C:\Users\j.jirutka\Documents\Arduino\libraries\UsbFat/UsbFat.h:62:12: error: 'FatFileSystem' has not been declared
return FatFileSystem::begin(part);
Hi Greiman !
many thanks for this library !
Is it available a ESP32 version ?
bye
peppe
Hi,
is there any way, how to reinitialize the USB device. On the start of program I initialize USB device, creat file, write file and close file, then I would like to reinitialize it, for subsequent connection of a new device
Does there exist any file with functions and key words for library UsbFat?
Thanks. Tomas
Hello @greiman ,
Thanks for your so easy to use library!
I've managed to run it on a Teensy 3.1 board and read files on a USB Memory Stick with it.
However, I want to read WAV files and play them using the Teensy Audio library: https://github.com/PaulStoffregen/Audio .
There's an example there utilizing SD card: https://github.com/PaulStoffregen/Audio/blob/master/examples/WavFilePlayer/WavFilePlayer.ino
I want to do the same but using your library but haven't managed to get the File commands right. Do you think you can help me with that?
Thanks,
Ziv
Hey :)
I'm writing a code that record car information (speed, gps data, car battery voltage, ect..).
In my code loop the data is being collected and written to a file (I followed your examples and it works).
My problem is in closing the file - in the example you did this:
if (Serial.available()) {
// Close file and stop.
file.close();
Serial.println(F("Done"));
while(1) {}
}
I won't have a keyboard connected to arduino board during the drive, how can I close the file automatically when the driver is shutting off the car?
I know your code is not updated, but if you have an idea how to solve this it would be a really great help for me!
Thanks.
When i try to execute initUsb function my Arduino pro mini crashes. In fact the real cause seems to be from usb->Init() where the function couldn't be resolved. You should have a look at it.
Thanks
Where exactly is defined the GPX PIN and can I changed it? For example, I would like to change D8 by D3.
I tried to compile with bluepill (STM32F103CbT6 - 128k), but because this uC already has internal USB, conflict occurred. So I had to change the library to compile.
If anyone wants to test to see if it works, follow attached.
Hi Bill,
I'm just playing with UsbFatBench and it works just fine on the first loop() execution, but when it again prompts "Type any character to start" on a 2nd loop execution, key.begin fails:
Type any character to start
Type is FAT32
Volume size: 15.50 GB (GB = 1E9 bytes)
File size 5 MB
Buffer size 100 bytes
Starting write test, please wait.write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
152.27,95995,1,655Starting read test, please wait.
read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
192.75,5001,1,517Done
Type any character to startkey.begin failed
I know that you are not developing this project anymore, but maybe you can give me some hints where to look and what could be the root cause of this behaviour? Thanks in advance.
Thanks for the super library!
I tested the library UsbFat on the board Arduino Uno and it worked. The problem is on the board Arduino Mega 2560, initialization is unsuccessful (Error: initUSB).
For SS I use pin 53. Miso, Mosi, SCL standardly 50, 51, 52. The sketch is same as example UsbLogger. Arduino IDE 2.0.0
Please, do you have any idea why it doesn't work?
Thanks. Tomas
Thanks for your excellent USB host code for data storage.
I am working on a project which uses a Mega ADK Arduino with an SD card shield. The project is basically a data logger with primary storage as the SD card while the secondary is the USB flash drive.
The USB flash drive is to download the files on the SD card.
I can log on SD card separately
AND
Use your excellent USB code separately
BUT
There seems to be a clash when sdfat.h or SD.h is added to your code.
Is there a way out? I need to use be able to copy files on the SD card to the flash drive. Thanks
I have bought an Arduino USB Host Shield to read an USB Stick with Arduino DUE. The problem is when I test the UsbFatDemo code always gives the Error: USB init fail.
Using an Arduino MEGA, I haven't had any problem. Any Idea?
Has anyone test this library with ESP8266?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.