bobarry / m2tklib

Automatically exported from code.google.com/p/m2tklib
0 stars 0 forks source link

Need to replace init function by begin function in sample files when using SDFat #136

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.using original sample file to access SD content(as per May 26 2014) 
2.
3.

What is the expected output? What do you see instead?
- not compiling, "init " function not recognized

What version of the product are you using? On what operating system?
pro micro board, windows 8, Arduino IDE 1.05r2

Please provide any additional information below.

Just need to replace Sdfat.init by sdfat.begin to account for new version of 
SDfat library
#if defined(FS_SdFat)
  pinMode(SS, OUTPUT);  // force the hardware chip select to output
  //if (sdfat.init(SPI_HALF_SPEED, 10) ) {
  if (sdfat.begin(10, SPI_HALF_SPEED) ) {  
Could not actually check if sample worked as sketch is oversized (>34K) anyway.

Thanks for the great job for your U8glib and menu libraries 

Original issue reported on code.google.com by francois...@gmail.com on 26 May 2014 at 9:12

GoogleCodeExporter commented 8 years ago
What is your version of the SDfat library?

Original comment by olikr...@gmail.com on 26 May 2014 at 5:59

GoogleCodeExporter commented 8 years ago
Dear Oliver,

My version is sdfatlib20131225 . 
In the changes.txt file of SD library, the author mentioned  "A key change was 
to remove sd.init(spiRateID, chipSelect) in favor of sd.begin(chipSelect, 
spiRateID).  The difference between these two is the order of the arguments 
which has caused serious confusion at times."

BTW, I am the same guy who posted about having issues with M2klib /SD examples 
being above 30K on the Arduino forum. 
This kind of surprised me as most of the Arduino boards like UNO and so forth 
have only 30K available for sketch. I did not see in the forums, any people 
commenting about having such  issues running your sample sketches.
In my limited understanding of compiler and Arduino, this makes me wonder if my 
issues might not have come from an improper Arduino IDE/compiler install 
resulting in the compiler loading useless piece of code thus bloating the 
memory.  What would be your opinion about this ? 

Thanks in any case for your great U8Glib and M2Klib libraries.

Cordially,
Francois

Original comment by FGaranc...@gmail.com on 27 May 2014 at 2:30

GoogleCodeExporter commented 8 years ago
Thank you for mentioning the change in the sd library. I guess i need to update 
the related code in this project.

Task is: Update SDFAT lib and apply changes

Sketch size: To my knowledge only view people use m2tklib. And not too many 
people use a SD card. So there are not too many complains.
In fact i developed sd support mainly for a project which as using a atmega644, 
with 64K flash. But the main problem is, that each lib requires some amount of 
memory and the combination of all three libs (u8glib, m2tklib and sdlib) fills 
up all flash ROM in a 32K controller. A Arduino mega board will be a better 
choice.

Original comment by olikr...@gmail.com on 27 May 2014 at 5:05