Arduino Tutorial: SD card module Micro SD tutorial DIY.
HTML-код
- Опубликовано: 20 авг 2024
- Arduino Tutorial SD card module Micro SD
Dear friends in this video we learn how to use the Micro SD module with an Arduino Uno. The SD card module is a very useful module to add storage space to any Arduino project. With this cheap module you can add huge storage space to any Arduino project. Useful for datalogging, for saving preferences, or store data for games.
💻 Code & Parts: educ8s.tv/ardui...
Want to learn to code?
👨💻 Check my new RUclips channel: bit.ly/3tku2n0
I hope you find this video useful. If you want to support the channel see how here: educ8s.tv/support-educ8s-tv/
I hope you find this video useful. If you want to support the channel see how here: educ8s.tv/support-educ8s-tv/
This turned out to be a lot easier than I expected. Now I can add data logging to my Solar Water Heater controller. Thanks for showing us how to do it.
If anyone is having the error where TEST.TXT is created, written to, and closed, but PREFS.TXT doesn't open here the explanation:
The PREFS.TXT file needs to already be on the SD card for it to be opened and read by arduino. The given code creates TEST.TXT but doesn't create PREFS.TXT. If you the same results as this video you have to create PREFS.TXT on your computer and upload it to the SD card before you run the code on arudino.
Thank you for this information, kind sir! You even added a footage from Lakonia!
I don't know why I missed this video. I'm glad I found it. :-)
This video helped me with my university discipline project, thank you so much
Thank you for putting in the time to make this very informative and easy to follow tutorial. Μπράβο !
+George Kot Thank you!
Very detailed and specific tutorial. Extremely helpful for my project. Thank you!
Thanks for the video, always very nice. One thing I don't understand : if it's a 3.3V module and 3.3V is available on Uno then why connect it to 5V? Probably does not matter but wouldn't it also work on 3.3V (if available)?
Yes
Hello my Greek friend from Canada :). Excellent yet simple video. I will be adding you to my list. Thanks MRK.
+Joe Riverdale Greeting to Canada! Thanks for the message!
Very clear and precise video. Thank you! You saved me a lot of time.
I have very big string array due to which my dynamic memory is filled above 100% will putting sd card module help.
hello . i have some problem .. i run the program and it says .. sd card initialization failed .. what should i do ?
Thank you from Canada great video
I do all this, but SD.begin returns false. what can i do?
check hardware
Great vid. I like the Beatles musak too.
Does the SD card need formatting and if so what should it be formatted in? I found a 1GB SD card in an old BlackBerry Cell Phone will that do?
Thank you for code / instruction. I love these kind of tutorial. Hope you make much more
Thanks a lot!
Without modification source code it works on Ardino Nano V.3.0 too.
Great and simple video. Thanks. One question: Can you read the file while writting it? I am asking because I want to store RC command data in real time - for example; if my RC robot car gives remote RC data from my transmitter, but can't keep the pace with my commands, it will be good to "listen" data from SD card, instead direct "listening" from my RC controller (data from RC transmitter will be written continously, while car will read only part of the file which can execute and keep pace with the data). Thank you in advance for answer.
EDIT: To avoid confusion, RC transmitter will send data in form of GPS coordinates, not from joysitck. Data will look like; "Go from current possition A to first point B, then go to point C...". So it may not be able to keep pace with my commands. If for some reason car does not execute commands properly, planned function "abort" will overcome data reading and commanding will be re-dirrected to direct jostick commanding.
***** Yes, that is possible but writing to the SD and reading from it is very slow. A better practice, is to have a buffer in memory with the last commands sent from the RC trasmitter. That way you have more more speed, and of course it is easier to implement.
Educ8s.com Thank you very much. It is very helpful. Now I know that I should change the strategy - instead writting/reading delayed commands, I will make as you suggested. Additional thing will be then writting log data on the SD card in car and in my transmitter, so that I can compare it later on my computer (to "debug" driving path). Thank you again, it is very helpful.
I want to read first line of text file from sd card and delete it . After that second line other lines should be shifted .Please help me in logic and commands
is there any way to use data on SD ? I save it in text data , I receive it in number? I can I conver it to text like as text i had saved
Very useful video! Thanks for explaining how to use SD cards with Arduino :-)
Thank you for another great explanation. I was a bit confused as to why you can only do one file at a time, but I suspect that the library must be using static state and hence the readLine() function. Am I misunderstanding this? Either way
thank you for taking the time to create this video for noobs like me!
Thanks, I might use this in one of my projects
will arduino suppourt 16/32 gb sd cards iam trying its two days but always showing sd card intialization failed
i tried with esp8266 also there also showing same error .. id ont have 4gb or 2 gb sdcards...connnections jumpers are correct
Thank you again Nick, excellent work, you are so easy to understand.
Thanks John for you kind words. I am glad this video was helpful!
πολυ καλη δουλεια και συγχαριτιρια!!αναρωτιομουν αν θα μπορουσες να κανεις κανενα tutorial σχετικα με arduini-rfid κατι που θα ηταν σαν(door lock)θα με βοηθουσε πολυ!!ευχαριστω
Many thanks ,
if I have multiple files in SD cards with different names, let's say 8 files in one sd card , now how can I able to select from these 8 files any file I like to let it work, for example if I have selectors switch can provide 5v. to (3 input pines) of Arduino board to provide 8 selection , so some time I want file with name (one) to work, after while l decided to let file with name (three) to work and stopped file (one) and so on
Thank you very useful tutorial but should've explained the functions.
very nice bro , how can i use this code for esp32?
My text file has two lines but it read only 1st line.(even with 2 line of 'Serial.println(readLine);'.
I know this is an old video, but i am struggling to find answers to the following
- will this card work with arduino-like devices that run at 3.3v not 5v? (e.g STM32 units) (and how to connect)
- what SD cards are OK and how should they be formatted? eg what is the maximum size, and must it be FAT16?
Thank You for this simple and concise tutorial!
Does anybody know the circuit or at least the chips used? I would like to integrate this into my custom board
Thank you very much sir you are doing very well
Thank you very informative video!! What's the difference between the SD card module you showed and the smaller ones (the ones without the chips)? Thanks!
You can make one Bluetooth music player using HC05 and this SD card module...if possible then please reply...we would also try then..
Thanks teacher! In wemos d1, you can D5 as CS, the filename is 8.3 in length.
quick question shouldn't D5 be assigned to SCK?
for some reason it only reads the first line correctly and the second line it prints like if its empty
Are MISO, MOSI and SCK sharable by using same columns in breadboard? These pins are already occupied by my TFT LCD setup.
I use 60 GB Sd card,Arduino cant find it,what i should do? Try smaller Sd?
Hope someone can mod GPD pocket (first version not the GPD pocket 2) and put this small card module in empty space inside it and expand the storage of the GPD pocket 128GB + 512GB maybe..
I'd be hyped to know how to DIY it my self....
Hi, I used your sketch and it worked almost fine.
The initialition, the creation, the writting and the closing seems going good, but the problem becames when it tries to open it again showing me the "Error opening file..."
I konw my SD card is not locked so I don't know what's going on.
Any idea?
+Fran Tra same here
same
Same here, anyone please help
Can we read or write data without logic level shifther if our MCU working at 3.3V?
Thank you Nick!!
Thank you very much
Hi!
How can I make that module to work with computer directly.
I wants to attach USB port with it. How I can do that?
Can anyone please help me
can they run off a 5vpower bank at the same time as the Arduino UNO r3? And does it need a resistor or to drop to the voltage from 5v to 3.3 using 220ohm and a 470ohm?
Nice video :)
Can we make data logger using sdcard shild?
Just what I wanted!
Thanks for the video. It helped a great deal. Any idea what chip does the SPI protocols
is their a shield i can use to connect multiple cd card adapters to? id like to connect a lot
Excellent video - I think so too!
Thank You a lot.
How can I connect microSD card reader module on SPI + SPI 1.44 LCD display ?
Arduino nano please help us doing a video.
Thank You
can i play different sound using this module with a potentiometer? depending on at different resistance it will play different sound?
Hello please can you tell me if i use Arduino nano then will the pins for SD card and Arduino Nano be the same as shown here?
hi, how do you detect when the SDCARD is inserted and pulled out ?
Very useful tutorial! thanks!
why not just connect the 3.3 on the microSD breakout board to the 3.3 on the Arduino Uno?
My module has a Chip Detect what do i do with it?
will this both read and write ?
Yes
if i want to play music converted into wav through arduino by sd card module will i delete the text.txt and prefs.text file........??????
Nice and thanks for the video
Can you not access the SD card directly by connecting the arudino to the computer? do you have to take it out?
is der any possibility of reading a particular line like i want to read 13 line and display is it possible if so please help me.
Perfect video THX.
please help. i can't upload my Sketch, it says "Serial port not Selected"..
is this tutorial can also applied to the SD card one? since i don't have the micro SD version of the module.thanks
Is images are also stored in SD Card by a camera which is connected by a arudino ?
Hi, can Arduino read and write unicode string ?
Sir do u have path remembering robot codes
Will it work if I use an nrf24 module and also a sd card module at the same time?
How fast can Arduino boards read files from SD cards??
thank you!
That was, not Arduino Uno???
Arduino has officially become a generic trademark! LOL Arduino open sources their boards and allows other companies to produce their own versions.
Thanks
Hello! ! Nice video, I have a problem : my SD card refuse to initialize and I don't know why, it's a 1GB card, need help
can i use this module to generate music?i still new to arduino stuft
Generate? I've seen people use the similar module to read MP3 files on microSD card and later playback them on. Haven't tried it myself tho...
Btw, I'm recommending RobotDyn on Aliexpress. Those guys are making their own boards and those are really high quality!
can u please post video of arduino interfacing wiith camera module
How to Download File Using GET HTTP Request and store in SD Card using NODE MCU.
(Here NODE MCU is not Server.)
File which i want to download is on cloud server.
NodeMCU -----------> send request for download ----------> File Server --------> send response back -------> save in NODEMCU
how to make usb sd card reader with this module
can you please comment me that how can i make a .txt file with date with arduino DS3231 module?
Is there any "ReadAllBytes"/"WriteAllBytes" equivalent?
I have a problem in serial monitor I get the following: Initializing SD card ...
SD card is ready to use.
File created successfully.
Writing to file:
This is sample text!
File closed
Error opening file ...
how do I solve it?
Do you have a "prefs.txt" file in your sd card?
Hello Valued Friend,
May you help me to get a sketch for reading and changing SDcard CID.
Thanks in advance!
Can you please help me to store ab image in sd card using arduino...
can it read csv file and display in lcd?
Hi Mate, were exactly are you from? I grew up in Lakonia, thats why i am asking. Nice work btw.
Hey David, I live in Sparta. Where did you grow up, and where do you live now?
@@Educ8s I lived in Skoutari and went to school in Githio. To 2008 epestrepsa Germania, opou menw mexri shmera. Yparxoun endiaferon Projekts, me ta opoia asxoleisai avton ton kairo?
Unable to detect the "Chip Select" pin of the SDCard adapter despite
providing the pin with a logic HIGH. Anyone faced this before ?
in this video, he connected vcc to 3.3 v while telling us to connect to 5 volt!
Thank you for this Video!
One question:
is there a reason for not using the 3.3 pin on the SD-board, instead of the VCC pin?
Manuel González Since we are using a 5V arduino it makes more sense to use the 5V voltage input. I haven't tried the 3.3V input though to see if it works.
can I use this kind of module to play audio files?
Sir how to transfer .txt file from one sd card to another using arduino?
Can we create folders? Is it possible to put values in different files after pressing a button for testing a sensor? For example - test1.txt is created, we're dumping some values. After pressing a button - test2.txt is created, we're dumping the values again, etc.
magdanoz88 it think it is
can you do a tutorial of datalog usind the sd card module and for example a temperature sensor and rtc? i want to do a weather station that stores the data every day. thanks! ;)
Maxes14 Yes, it is coming this weekend, I just built it and works great!
Educ8s.com perfect, thank you for your all tutorials!;)
hi, is it possible to delete line in sd.h?
since Sd card and Nrf24L01 using same SPI, mean the MOSI MISO pin, how can solve the problem? thanks
I know this is an old comment, but if I were you I would simply use two seperate arduinos communicating on an I2C Line with each other.
Hey, im new to using SD cards with arduino, but my code gives an error because my SPI isnt full speed but half speed... do u know how to change it ?
Wie geht das mit einem LCD/
Run that With a LCD
I need help. I use this tutorial to connect this sd card module to arduino DUE. Not work. Adapter work well with arduino UNO, but with DUE not. I use 51,50,52 and 53 pin like describe for MEGA. And Vcc to 5V, and GND. I also try with EXAMPLES-SD-CARD_INFO and also change sketch in "const int chipSelect = 53;" , and "pinMode(53, OUTPUT);" , Where I make wrong. Thanks
+3mmrakov I haven't tested it to Due yet. Are you sure that the SPI protocol in DUE is at the same place as in MEGA? Check the SPI pins first.
+Educ8s.com I found solution.
On link
mrossphoto.com/wordpress32/wp-content/uploads/2013/05/LPD8806-DLW-Dual-Strip-Wiring-Arduino-DUE.jpg
Tnx any way