Hi Sara & Rui,
I am trying to get SD CARD installed on the Lilygo T-Call Sim800L but failed. Looked all over the internet but still could not find a solution. appreciate your help!
//SD Card
#include “FS.h”
#include “SD.h”
#include “SPI.h”
#define CS 15
#define SCK 14
#define MOSI 13
#define MISO 12
.
.
/* initialize SD CARD */
SPIClass spi = SPIClass(HSPI);
//spi.begin();
spi.begin(SCK, MISO, MOSI, CS);
if (!SD.begin(CS,spi,80000000)) {
Serial.println(“Card Mount Failed”);
return;
}
Hi.
What is the microSD card module you’re using?
Double-check the wiring.
You can also take a look at our SD card tutorial and see how to assign custom pins: https://randomnerdtutorials.com/esp32-microsd-card-arduino/#sdcardcustompins
Regards,
Sara
found the culprits –
- GPIO12
- SD.begin(CS,spi,80000000)
Now, MISO is assigned to GPIO2 and I remove the bus frequency. it works just fine so far.
//SD Card
#include “FS.h”
#include “SD.h”
#include “SPI.h”
#define CS 15
#define SCK 14
#define MOSI 13
#define MISO 2
SPIClass spi = SPIClass(HSPI);
/* initialize SD CARD */
spi.begin(SCK, MISO, MOSI, CS);
if (!SD.begin(CS,spi)) {
Serial.println(“Card Mount Failed”);
return;
}
thanks.
cheers!!!
test result…
19:01:25.001 -> Welcome…
19:01:25.001 -> wait 3sec !!!
19:01:25.001 ->
19:01:29.117 -> SD Card Type: SDHC
19:01:29.117 -> SD Card Size: 29819MB
19:01:29.117 -> Checking for locally stored non-schedule wakeup(s)
19:01:29.257 -> Checking for non-schedule wake up
19:01:29.257 -> local inbox empty – new schedule not set.
19:01:29.257 ->
19:01:29.257 ->
19:01:29.257 -> Boot count : 1
19:01:29.257 -> System is online since : 26/10/2021 19:01:28
19:01:29.257 -> RTC time at wake up : 26/10/2021 19:01:28 (1635274888)
19:01:29.257 -> Millis() entering setup : 877
19:01:29.257 -> System time at wake up : 5
19:01:29.257 -> Wakeup by other cause(s) : 0