SD Logger + Motor Shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
maddhat
 
Posts: 10
Joined: Sat Aug 13, 2011 9:15 am

SD Logger + Motor Shield

Post by maddhat »

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

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Logger + Motor Shield

Post by adafruit_support_bill »

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.

User avatar
maddhat
 
Posts: 10
Joined: Sat Aug 13, 2011 9:15 am

Re: SD Logger + Motor Shield

Post by maddhat »

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

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

Thank you.

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Logger + Motor Shield

Post by adafruit_support_bill »

Sorry about that. Here's the link: http://forums.adafruit.com/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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”