I've successfully adapted my GPS+SD logging test program for UNO/MEGA to make a DUE version.
I recently changed over to the NeoGPS library for its improved performance, low memory usage, configurability and stability under load. This version is only possible because author /DEV (SlashDevin) has just updated the library for DUE (and provides great support)
The hardware I used:
- Adafruit Ultimate GPS breakout connected to Serial2
- Sparkfun microSD shield (CS pin #8) with MOSI/MISO/SCK cross wired from pins 11,12,13 to the SPI header in centre of the DUE (carefully fold up the pins under 11,12,13 so they don't connect to the DUE)
- pushbutton to toggle logging ON/OFF using a pin change interrupt on pin 2 (with 10Kohm pull up)
- activity LED on pin 5
PS: I had to cut a chunk out of the sparkfun shield to expose to the SPI header - ugly but effective!
See attached ZIPs with the sketch, a short CSV log file example plus same in XLSX with a bit of formatting and a few calcs.
DueSDlog.c.zip (10.2 KB)
DueSDlog.c_logfiles.zip (19.2 KB)