Welcome to the Tweaking4All community forums!
When participating, please keep theĀ Forum RulesĀ in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For exampleĀ “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post willĀ not bring you to the same post, in Dutch, as there is no translation for that post!
I can not get the microSD to work on the ESP32.Ā I can connect the module to my Arduino Nano and it works fine.
I used the CardInfo example from the Arduino IDE under Examples/SD/CardInfo.Ā No matter how I wire the SD module the sketch returns "initialization failed"
I also tried a few sketches for the Uno, Nano and some that were supposed to work on the ESP32 and all give an error initializing the SD module.
Most of these sketches use SD.h but some use SdFat.h
I have the same SD module connected to my Nano. When I had problems getting it to work on the ESP32 I swapped the boards. Both boards work properly when connected to the Nano.Ā Neither will work properly with the ESP32
In an attempt to try to find a solution, I did read somewhere that removing the SD card while uploading the sketch could do the trick. Maybe this is a helpful post. 🤞🏻
The problem is in the part of the code that initializes the SD card.Ā I have tried the SD module connected to my nano and there are no issues.Ā Ā I have not been able to get the module to work connected to the ESP32
Serial.print("\nInitializing SD card...");
Here is the initiilization from the cardinfo example in the SD.h
if (!card.init(SPI_HALF_SPEED, chipSelect)) { Serial.println("initialization failed. Things to check:"); Serial.println("* is a card inserted?"); Serial.println("* is your wiring correct?"); Serial.println("* did you change the chipSelect pin to match your shield or module?"); while (1); } else { Serial.println("Wiring is correct and a card is present."); }
The code may be slightly different but the result is the same, it will not find or initialize the SD module on the ESP32
I sent days of research and weeding through code that the authors say will work, but actually doesn't.
I was able to get the microsd module working on the ESP32.Ā I don't quite understand why the other libraries and wiring didn't work. But as long as it works.
The key was using mySD.h and not SD.h or SDfat.h.Ā Not sure why they don't work but I think it has something to do with the non-standard SPI pins on the ESP32.
Wiring is on the Heltec ESP32 WiFi Lora Development board.
SD Module CSĀ Ā Ā to ESP32 Pin 26 SCK Ā to ESP32 Pin 27 MOSI to ESP32 Pin14 MISO to ESP32 Pin 13 VCCĀ Ā to ESP32 5V GNDĀ to ESP32 GND
I see it being used in this library: ESP32 micro SD card where the writer states: "this library is for Arduino, I modified it to adapt with ESP32". Rather poorly linked on his Github page, but I did manage to find this demo - which may or may not be helpful.
He used this for wiring (the same as you did as far as I can see):
That would make sense since, as far as I could tell, does not change from SD.h to mySD.h
When I ported the sketch from the nano to the ESP32 the only change I made to the SD portion is to change the library.Ā The code itself did not change.
Did you see anything about using long filenames or is mySD still limited to 8.3 filenames?
On a side note, how can you create wiring diagrams like the one you sent?
Thanks.Ā I will look over the library for more info just in case
I'd try to stick to short file names - it's just the most foolproof approach. I can see that you'd probably want to store a date/time in the filename, which would make 8.3 too short for this purpose.
Diagrams:
This one I actually copied from another website, but when I do want to draw something like this I typically grab, and highly recommend, Fritzing (free and they offer a nice service for PCB's - which I have not used yet).
I came to the same conclusion about filenames.,Ā I just changed the name of the GPS data file from data.txt to GPS-data.txt
I looked at fritzing and it is no longer free: "We are asking you to pay 8⬠(less than US$9) for downloading the application. This way we can ensure future releases, bugfixes and features.
I did find a download on another site but the app just locks up after running. Maybe it doesn't like windows 10
Interesting, Fritzing has never given me any problems (under macOS). 🤔Ā Not sure when you tried it the last time? I recall that specifically under Windows, early version could be "problematic" haha.
Maybe Circuit.io is a good alternative you may want to look into. Personally I do not like web-based apps.
Back in the day, mostly for PCB design but they have added more options, EagleĀ was the way to go. Unfortunately, it feels like they forgot to innovate and they have been purchased by AutoDesk. (link - there appears to be a free version).
I totally overlooked the message from you where you mention that Fritzing is no longer free ... yikes.
I did find a few links where you can still download a recent version:
nPack.org (link - Windows version, it says 0.9.4 but it actually is 0.9.3b)
ComputerBild (German) seems to have 0.9.4 available for Windows (link)Ā
Domoticx (Dutch) has quite a few versions for Windows (link)
Having said that: I have no idea what is going on with those guys ... seems they had a ton of legal issues, and now (yikes!!) switched to JavaScript ... not sure when or as of what version this happened though.
Just tested the Fritzing version (for Mac) from ComputerBild and it works pretty OK (it is a little slow), so I'd assume it may work under Windows as well.
After spending some time on Circuit.io, I can say that it looks really nice but with some setups you're forced to use it a certain way (try adding an ESP8266 + a LED strip -> it will add MosFETs even though I didn't ask for it). In the meanwhile, I think Eagle may not be the tool for you, as it still heavily focuses on PCB design.
@hansI looked at eagle and it is very complicated and I agree, I don' t think it will do what I need.
I did download the latest fritzing from the page you suggested.Ā I should have asked you to translate where the download was since I can not read the German.Ā But google translate did a good enough job that I was able to find and download it.
The version fritzing.0.9.4.64.pc_and_dll seems to be a huge improvement and stable.Ā At least it runs without constantly crashing.
I just created a simple breadboard view, no connections yet.Ā I could not find the GPS module or the display in the parts.Ā But I found an Adafruit fritzing parts master which did include the SSD7735 display with microsd.
I was not able to find a fritzing part file for the GPS module.Ā But I found a simple breadboard file where I was able to copy and past a basic GPS module for now.
I will try making connections and see how it goes.
Kubuntu Kubuntu is a Ubuntu variant that use KDE as it's desktop manager. Fast and well supported.
PreLoaders Handy little online tool to generate preload images (spinners).
Frizting Free tool to design schematics and PCB's - they even offer a very affordable PCB production service.
PDFCreator Ultimate tool for Windows users: Print ANYTHING you can print to a PDF with this FREE printer driver.
CleverSubmitter Submits your website for indexing with a truckload of search engines.
Lazarus / FPC Lazarus / Free Pascal Compiler - A cross platform software development environment that show similarities with the good old Delphi.
Links Page These and more of our favorite links can be found on the Links Page.
New Downloads
ConnectMeNow4-v4.0.18-macOS-x86-64.dmgDate: 2024-04-24 - Size: 3.5 MBVersion 4 of ConnectMeNow - A tool for more convenient mounting of network shares under macOS. This is the Intel version which works on Intel and Apple Silicon Macs.
ConnectMeNow4-v4.0.18-macOS-arm64.dmgDate: 2024-04-24 - Size: 3 MBVersion 4 of ConnectMeNow - A tool for more convenient mounting of network shares under macOS. This is the Apple Silicon version (not suitable for Intel).
MiniWOL2 MacOS (64 bits Apple Silicon)Date: 2023-08-01 - Size: 1.2 MBminiWol is a simple, but effective application to send Wake On LAN to network devices. This is the signed 64 bit MacOS ARM (Apple Silicon) version.
MovieScanner2-2.2.3-Windows-32bit-setup.exeDate: 2023-04-12 - Size: 18.6 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 32 bit Windows version.
MovieScanner2-2.2.2-Linux-GTK-64bits.tar.gzDate: 2023-04-11 - Size: 29.2 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit Linux version for GTK.
MovieScanner2-2.2.2-Linux-QT5-64bits.tar.gzDate: 2023-04-11 - Size: 29.1 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit Linux version for QT5.
Downloads Page Find these and more Downloads on the Downloads Page, where you will also find articles references, operating system requirements and categories.
Amazon Ads
Support us by doing your shopping at Amazon.com, either click the link, or click one of the links below …
You can also sponsor us through theseĀ Amazon offerings:
Please consider disabling your ad blocker for our website.We rely on these ads to be able to run our website.You can of course support us in other ways (see Support Us on the left).