Any Petit FatFs example?

Libraries, utilities, bootloaders...

Re: Any Petit FatFs example?

Postby mougino » Tue Aug 11, 2015 3:46 pm

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
User avatar
mougino
 
Posts: 75
Joined: Sat Jul 25, 2015 8:15 am
Location: Paris, France

Re: Any Petit FatFs example?

Postby jonnection » Tue Aug 11, 2015 4:05 pm

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.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: Any Petit FatFs example?

Postby jonnection » Tue Aug 11, 2015 4:18 pm

@ 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.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: Any Petit FatFs example?

Postby Valden » Tue Aug 11, 2015 4:22 pm

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.
User avatar
Valden
 
Posts: 31
Joined: Mon Jun 08, 2015 5:33 pm

Re: Any Petit FatFs example?

Postby mougino » Tue Aug 11, 2015 6:18 pm

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
User avatar
mougino
 
Posts: 75
Joined: Sat Jul 25, 2015 8:15 am
Location: Paris, France

Re: Any Petit FatFs example?

Postby Zvoc47 » Tue Oct 06, 2015 3:33 pm

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.
Zvoc47
 
Posts: 56
Joined: Mon Oct 05, 2015 10:03 pm

Previous

Return to Software Development

Who is online

Users browsing this forum: No registered users and 21 guests

cron