Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

SD Logger + Motor Shield
Moderators: adafruit_support_bill, adafruit

SD Logger + Motor Shield

by maddhat on Sat Nov 17, 2012 11:37 am

Using Arduino Uno + Motor Shield and have the SD Logger connected using the terminal block board. As pin 12 is reserved for the motor shield, is there any way to re-direct which pin the SD card is to use within software? I have D12 on SD card connected to D09 on the arduino. My goal pinout:

D02 --> GREEN LED(sd D4)
D03 --> RED LED (sd D3)
D04 --> MOTORSHIELD
D05 --> stepper
D06 --> stepper
D07 --> MOTORSHIELD
D08 --> MOTORSHIELD
D09 --> sd D12
D10 --> sd D10
D11 --> sd D11
D12 --> MOTORSHIELD
D13 --> sd D13
14 --> sensor1
15 --> sensor2
16 --> sensor3
17 -->
A4 --> rtc
A5 --> rtc
maddhat
 
Posts: 10
Joined: Sat Aug 13, 2011 9:15 am

Re: SD Logger + Motor Shield

by adafruit_support_bill on Sun Nov 18, 2012 10:47 am

It is possible to talk to the SD card via software SPI using different pins. This link has a sketch that uses software SPI to do logging on a Mega.

adafruit_support_bill
 
Posts: 37526
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Logger + Motor Shield

by maddhat on Wed Nov 21, 2012 12:29 pm

Did you intend to add a link to the previous comment?

Also, I'm using an Uno, not a Mega.

Thank you.
maddhat
 
Posts: 10
Joined: Sat Aug 13, 2011 9:15 am

Re: SD Logger + Motor Shield

by adafruit_support_bill on Wed Nov 21, 2012 1:21 pm

Sorry about that. Here's the link: viewtopic.php?f=31&t=27245
Also, I'm using an Uno, not a Mega.

Software SPI works on the Uno too. If you can't use the hardware SPI pins, software SPI allows you to re-map it to other pins.

In the case of the Logger shield, there is one more issue: The SPI MISO signal is hard-wired to pin 12. You will need to cut either the pin or the trace and add a jumper to the pin you will be mapping it to.

adafruit_support_bill
 
Posts: 37526
Joined: Sat Feb 07, 2009 10:11 am