Heltec-Aaron-Lee / WiFi_Kit_series

Arduino source codes and toolchain for WiFi_Kit_series made by HelTecAutomation.
GNU Lesser General Public License v2.1
766 stars 308 forks source link

6Pin SPI SD-Card Adapter does Not work using defined pins #95

Open asalaices opened 5 years ago

asalaices commented 5 years ago

I have been trying to get a 6pin SPI "SD TF Card Adater Reader Module " on the Heltec wifi Kit 32 using the Pins as shown in the Diagram and the Card just won't work. I am using pins

static const uint8_t SS = 5; static const uint8_t MOSI = 23; static const uint8_t MISO = 19; static const uint8_t SCK = 18;

Exactly as defined in the pins_arduino.h for the Wifi-Kit-32 and the card just refuses to work. I am successful when using the mySD library that allows me to pass all the SPI Pins, but that library has incompatibility problems.

Is there anything specific in Code I have to do to get it working ? I Can you please provide a Quick diagram showing the pin connections from the SD board to the Heltec ? a Sketch would be great as well !

The code where its failing:

if(!SD.begin()){ Serial.println("Card Mount Failed"); return; }

Thanks so much ..

Heltec-Aaron-Lee commented 5 years ago

Please try this example: https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/examples/SD/SD_Time/SD_Time.ino