Page 2 of 2

Re: Any Petit FatFs example?

PostPosted: Tue Aug 11, 2015 3:46 pm
by mougino
Wow, thanks Valden :lol: This is exactly what I was looking for!
Still some tuning to do, but I managed to make it work for now.

Thanks again,
Nicolas

Re: Any Petit FatFs example?

PostPosted: Tue Aug 11, 2015 4:05 pm
by jonnection
mougino wrote:...
and neither rx nor tx are defined anywhere...
Are there any other files needed to make jvideo4.ino work ?
As is, it's not possible to compile.


TimerOne is a well-known Arduino library http://playground.arduino.cc/Code/Timer1

I have mentioned it in the instructables: http://www.instructables.com/id/Streaming-video-from-SD-card-to-Nokia-LCD-with-Ard/step6/Playback-program-sketch-for-the-Arduino/

tx and rx are functions (not variables) in the middle of jvideo4.ino. The PFFS.begin takes CS pin number and two function pointers as attributes.

Re: Any Petit FatFs example?

PostPosted: Tue Aug 11, 2015 4:18 pm
by jonnection
@ Valden: please notice that you are initializing SPI twice. 1st in gb.begin (it is built in there) and then at spi_init. While there is no harm in it, it is wasted code space. I think it *should* work without spi_init, because spi has been initialized already in gb.begin. But you have to test to be sure.

Re: Any Petit FatFs example?

PostPosted: Tue Aug 11, 2015 4:22 pm
by Valden
Oh yes, i just tried it works without. I was thinking that maybe it was needed in order to properly initialize the SD card, as the Gamebuino standard library don't seem to use it.

Re: Any Petit FatFs example?

PostPosted: Tue Aug 11, 2015 6:18 pm
by mougino
jonnection wrote:tx and rx are functions (not variables) in the middle of jvideo4.ino.

Thanks Jonne! weird, I redownloaded the ino file at instructables.com and I confirm, there are tx() and rx() functions. The one I had before was only partially downloaded it seems :oops:
Sorry for the previous post, false alarm then!

Nicolas

Re: Any Petit FatFs example?

PostPosted: Tue Oct 06, 2015 3:33 pm
by Zvoc47
Hello, I'm looking for the same thing.
I hope I'm not hijacking the thread. If I am, please tell me.

I want to know if there's a library for FAT filesystem on an external flash storage chip or a way to just change the behavior of the current FAT filesystem libary to not work just with the SD card, but also the external flash storage chip.

And I'd like to give a hint. To spare RAM from strings, you should use PROGMEM strings and make functions for printing from Flash memory space. Usage of printf might be good, but as much as I remember, you need to disable floating point math for printf("%g"); in order to save Flash memory space too. So if you have mixed Flash and RAM strings, you can do this:
Code: Select all
char playerName[17];
char PROGMEM someConstantString = "I like cookies";
printf_P(PSTR("Player named %s constantly says: %S"),playerName,pgm_read_ptr(someConstantString));

However, you'll need to include stdio.h, pgmspace.h and set up the stdio.h like said in a tutorial written in that same header file. Go check.