New user issues with ESP32 and a SD Card Reader
Posted: Wed Jan 06, 2021 10:53 am
Hi all,
First time poster here and have only had my ESP32 for 2 months now!
I am having issues getting my SD card reader to work. It works perfectly in my Arduino Uno, but I can't get it to work on my ESP. My wiring is as below (it is a 5v SD board):
SD Card - ESP32
CS - 5
SCK - 18
MOSI - 23
MISO - 19
When I load up on the Arduino IDE the Example 'SD-Files' it just says the below in the Serial output:
Initializing SD card...initialization done.
example.txt doesn't exist.
Creating example.txt...
example.txt doesn't exist.
Removing example.txt...
example.txt doesn't exist.
If I take out the SD card from the reader the Initialization fails, so I know that it can see the card, it just can't read or write to it. The SD card is 2GB and formatted as FAT. I have tried 3 different card readers and 4 different SD cards, all card readers and cards are readable by my Arduino Uno.
I tried loading the example 'CardInfo', but it errors on compile stating " 'Sd2Card' does not name a type".
Does anybody have any basic code that allows loading of a file and writing something to it?
I want to write a program that reads a text file for the SSID and password details which are stored on it, so it can then use them to connect to a wireless network.
Many thanks to all who reply to my post.
Alan
First time poster here and have only had my ESP32 for 2 months now!
I am having issues getting my SD card reader to work. It works perfectly in my Arduino Uno, but I can't get it to work on my ESP. My wiring is as below (it is a 5v SD board):
SD Card - ESP32
CS - 5
SCK - 18
MOSI - 23
MISO - 19
When I load up on the Arduino IDE the Example 'SD-Files' it just says the below in the Serial output:
Initializing SD card...initialization done.
example.txt doesn't exist.
Creating example.txt...
example.txt doesn't exist.
Removing example.txt...
example.txt doesn't exist.
If I take out the SD card from the reader the Initialization fails, so I know that it can see the card, it just can't read or write to it. The SD card is 2GB and formatted as FAT. I have tried 3 different card readers and 4 different SD cards, all card readers and cards are readable by my Arduino Uno.
I tried loading the example 'CardInfo', but it errors on compile stating " 'Sd2Card' does not name a type".
Does anybody have any basic code that allows loading of a file and writing something to it?
I want to write a program that reads a text file for the SSID and password details which are stored on it, so it can then use them to connect to a wireless network.
Many thanks to all who reply to my post.
Alan