I recently purchased a Multiwii/MegaPirate board from Hobbyking for a project I’m working on.
The picture of the board is accurate to what the v2 is.
What I’m trying to do is connect an Adafruit microSD card breakout board to it.
From the documentation from Adafruit, I have to connect the SDcard to pins 50-53(for a mega) which are MISO, MOSI, SCK, & SS. On a traditional mega this would be simple, but my flight controller does not have those pins, so I have been trying to connect them to the SPI pin header. Then, when I run the cardinfo sketch provided from the Adafruit SD library, it keeps saying that the card initialization has failed. I know the board and card work because if I wire it to my Uno it works fine. I have also tried running the cardinfo sketch with the MOSI, MISO, and SCK wires disconnected from the Uno and it is giving me the same problem as on the mega so I think the SPI pins need to be explicitly initialized on my board somehow, but I don’t know how.
Is there a special way that I have to initialize the SPI pins or are they connected directly to pins 50-52 (53 can be set to any pin and is not restricted to 53 only) and i would initialize those pins using pinMode(). Also the SPI pinout shows that it has MOSI, MISO, & SCK so I am not sure what i am doing wrong. I also dont know if the SPI pins are connected to pins 50-53. I am going to run an LED light up test to see if they work that way, but any help would be greatly appreciated! I have been trying to get this to work for close to a week now.