Adafruit SD + Mega + Datalogger

Hi All,

I have been using a Uno with an I2c 20x4 LCD, with this shield
https://www.amazon.com/HiLetgo-Logging-Recorder-Logger-Arduino/dp/B00PI6TQWO/ and it is the later version with the ICSP pads that Adafruit mentions in their current Library on Github.

and with this GPS
https://www.amazon.com/DIYmall-AeroQuad-Antenna-Arduino-Aircraft/dp/B01H5FNA4K/

It has been working fine but the SD card hogs so much dynamic memory, it is a constant fight to keep the level under 80%. I'd like t use a Mega but cannot get it working yet. I have followed the Adafruit PDF and also online tutorial.

In the Examples "datalogger" Adafruit suggests changing the "begin(chipSelect);" to "begin(10,11,12,13);" but I am getting

no matching function call to SDLib::SDClass::begin(int,int,int,int)

Is it going to be possible to make this work with the Mega or not?

If so, could someone please point me at an online guide or tell me what I need to do as clearly, the Adaftuit PDF is out of step with their current Library.

it is the later version with the ICSP pads that Adafruit mentions in their current Library on Github.

So please post a link to the actual product you have, better would be a link to the schematics of the shield.

In the Examples "datalogger" Adafruit suggests changing the "begin(chipSelect);" to "begin(10,11,12,13);" but I am getting

Post a link to the library you're using!

Is it going to be possible to make this work with the Mega or not?

Given your shield actually uses the ICSP header: yes. Otherwise you would have to rewire it, which usually isn't the intention if you bought a shield.

If so, could someone please point me at an online guide or tell me what I need to do as clearly, the Adaftuit PDF is out of step with their current Library.

I'm missing the link to the resources you are using.

The Arduino MEGA uses different ports to communicate with SPI the right ports are :

SCK = 52
SDA = 51
DO = 50
CS = 53 (Select Pin)

Connect the Adafruit SD or Micro-SD the ports above, connect power +5v and GND (Ground). Well Done !!!

I'm having the exact same issue. For those interested, here's the link to the Adafruit article explaining the compatibility issues with the DataLogger Shield product and the UNO vs MEGA. They suggest changing one line of code (SD.begin()) so the MEGA knows to direct SPI input/output using pins 10, 11, 12, 13 (what the shield is connected to and expects SPI, normally provided by these pins on the UNO. The MEGA uses others (50-53, I believe).

The problem is that the SD library SD.cpp doesn't expect 4 arguments and the compiler kicks the exception. What I don't quite understand (knowing that all my library files are up-to-date) is why the suggested changes do not work. I'm obviously missing something here.

My post here is really a question: Did you ever happen to find the answer to YOUR question and a fix? Would you please share that or any other info you can about this?

Thank you very much.

Just to clarify and for accuracy, here are the reference info for precise SPI pin outs for UNO / MEGA :

** UNO: MOSI - pin 11, MISO - pin 12, CLK - pin 13, CS - pin 4 (CS pin can be changed)
and pin #10 (SS) must be an output
** Mega: MOSI - pin 51, MISO - pin 50, CLK - pin 52, CS - pin 4 (CS pin can be changed)
and pin #52 (SS) must be an output

GOV

Update: Obviously, the Library Manager utility in the IDE that indicates that no libraries are "UPDATABLE" is not all-knowing as I had assumed. I kept digging and looked into the current SD.cpp file residing on GitHub and found that the library has been fixed so that the compiler exception I mentioned earlier is no longer an issue.

Thank you.
GOV