How to read and write SD cards with the Arduino Uno | UATS A&S #6

  Рет қаралды 64,659

Michael Schoeffler

Michael Schoeffler

Күн бұрын

Пікірлер: 55
@joaopereira2659
@joaopereira2659 2 жыл бұрын
hello thank you very much for your code, but when I close the program and insert the SD card into my computar i have a folder, a sys file and other files with no extention named with very strange caracters.. the folder I cant open it says that the name is not valid, no to mention the other files.. the text file we created in the cod is nowhere to be found.. maybe is there a way to terminate the progam execution in a certain way that avoids currupt files?? or what am I missing?
@vnarend
@vnarend 11 күн бұрын
Thank you this is simple and neat
@Drxxx
@Drxxx 3 жыл бұрын
What is with SRAM? Does it change or is only for flash memory?
@shashwatsharma5764
@shashwatsharma5764 5 жыл бұрын
I uploaded the code into the arduino but not able to see the console box that we are supposed to get at 7:01. pls help
@yaserali2092
@yaserali2092 6 жыл бұрын
Hi, Michael Schoeffler Thank You For this tutorial I have question about (I need to store \ mouse pointer movents ) in SD cards
@taranagnew436
@taranagnew436 4 жыл бұрын
if i just want to read files, would i use the read function and display it to a lcd?
@redstonesalat7293
@redstonesalat7293 4 жыл бұрын
Run that With a LCD? I want to build a e-reader
@razva211
@razva211 4 жыл бұрын
How can I change the pin ports of the SD Card reader ?
@MrSasha3050
@MrSasha3050 6 жыл бұрын
Do you have to try connect SD card and Oled 0.96 ssd1306 display and draw images from card?
@khalidabdulrazak3322
@khalidabdulrazak3322 5 жыл бұрын
Hi Michael; Thank you for your tutorial; I have an issue with storage in SD card. I am losing the previous data because the SD card opens the same file every time and overwriting on it I want new file with a new name every new sensor run. I am using 3D accelerometer sensor and I want to store the data in SD card, for example, create file 1, then when I switched off the sensor and switched on the new data will overwrite on file 1, instead of that I need to create File 2 to store the new data and so on.
@billfield8300
@billfield8300 3 жыл бұрын
khalid.. that can be done by using a different file name every time you open the new file. If you want to have the file name generated by the microcontroller. use a variable that increments as the file name.
@yashmanwani6232
@yashmanwani6232 2 жыл бұрын
you can maintain another file on sd card called "runNumber.txt" using which you can track the current runNumber and then name your current logfile based on the number you saved on runNumber.txt on the last run. increment and save this file on every run.
@mr.techinventor3463
@mr.techinventor3463 3 жыл бұрын
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
@nimraaslam6760
@nimraaslam6760 6 жыл бұрын
hi can we connect SD card with arduino and nodemcu at the same time for ardiuno write the data in the sdcard and nodemcu read this data and send to server
@RagMama123
@RagMama123 6 жыл бұрын
Excellent tutorial. Very informative! Thanks.
@DiySpeaker-Vn
@DiySpeaker-Vn 6 жыл бұрын
các ban có thể tham khảo sản phẩm tại: www.sendo.vn/module-micro-sd-card-9277379.html
@oncledan282
@oncledan282 5 жыл бұрын
Good day, Michael. I realize it was a long time you posted this video but, if you could, I would;ld as you to answer a question for me. I have the very same setup (hardware) and after writing multiple variables of 'short' and 'float' type, I have the upmost difficulty reading them back and reassign them to proper variables. It seems that either I write them wrong (but I can read them just fine with a text editor like TextEdit) or read them the wrong way. My project stores environmental information such as Year, Month, Day, Hour, Minute, Second, Temperature, Humidity, Pressure (and their Minimums and Maximums) as well as the Battery level. This is done every 15 minutes. I want to be able to read each variable separately .. not the whole file at once, like your example shows. Can you please indicate a simple way to do this task ? I am quite new to the Arduino environment so, I would appreciate a simple step-by-step solution, along with simple 'newbies' explanation, so I can learn from you. I thank you very much for any help you want to provide. This is well appreciated. Until then, have a nice day and take good care.
@ariffiram1332
@ariffiram1332 6 жыл бұрын
sir i have a probelm in sd card opening file ... it give error opening file .. you shared something about this in comments which i m not understanding .. i tried it in examples of arduino dump files which give me error opening file whats the reason kndely expalin it in detail.. how to create a file thanks alot
@JassonQuill
@JassonQuill 6 жыл бұрын
is it also capable reading csv file?
@mitalytabassum225
@mitalytabassum225 4 жыл бұрын
it is not storing data when serial monitor is not opened what to do ?
@JuicyVids1
@JuicyVids1 7 жыл бұрын
Thank you very much, Quick question how can you make a file? is this possible? Thanks :) Edit: using the arduino code? I really Hope that makes sense haha
@mschoeffler
@mschoeffler 7 жыл бұрын
Hi, if you write "SD.open("file.txt", FILE_WRITE);", a new file will be created. You can find my complete source code on my personal blog => www.mschoeffler.de/2017/02/22/how-to-use-the-microsd-card-adapter-with-the-arduino-uno/. You can find the source code for creating a new file starting at line 26. Let me know, if I can help you any further.
@JuicyVids1
@JuicyVids1 7 жыл бұрын
Ohhh nice thank you, you are a great help! Thanks!
@JuicyVids1
@JuicyVids1 7 жыл бұрын
Wait, If I do that will it create a txt file on the SD card so If I plug it into my PC it will show up with all the data on it?
@mschoeffler
@mschoeffler 7 жыл бұрын
+Cool cool Yes, that is the expected behaviour ;)
@JuicyVids1
@JuicyVids1 7 жыл бұрын
Great! Thank you very helpful!
@alizaxxa
@alizaxxa 6 жыл бұрын
sir plz can u help I wanted to make a mini program to read and then write some data from one card to other using arduino
@taranagnew436
@taranagnew436 5 жыл бұрын
how do i read data from sd card and display it to a display (32X32 matrix)
@haroldhong8645
@haroldhong8645 6 жыл бұрын
great vid! very informative! however can i delete or select certain line of txt in the text file? ex. abcd efgh ijkl i just want to delete the abcd ?
@mr.techinventor3463
@mr.techinventor3463 3 жыл бұрын
I am also finding
@emmamoubiala3557
@emmamoubiala3557 7 жыл бұрын
i cant really see what is written inside the while loop, can someone help please
@mschoeffler
@mschoeffler 7 жыл бұрын
Hi, you can find the complete source code here: www.mschoeffler.de/2017/02/22/how-to-use-the-microsd-card-adapter-with-the-arduino-uno/ I copied everything from the loop function below: void loop() { file = SD.open("file.txt", FILE_WRITE); // open "file.txt" to write data if (file) { int number = random(10); // generate random number between 0 and 9 file.println(number); // write number to file file.close(); // close file Serial.print("Wrote number: "); // debug output: show written number in serial monitor Serial.println(number); } else { Serial.println("Could not open file (writing)."); } file = SD.open("file.txt", FILE_READ); // open "file.txt" to read data if (file) { Serial.println("--- Reading start ---"); char character; while ((character = file.read()) != -1) { // this while loop reads data stored in "file.txt" and prints it to serial monitor Serial.print(character); } file.close(); Serial.println("--- Reading end ---"); } else { Serial.println("Could not open file (reading)."); } delay(5000); // wait for 5000ms }
@gaets04
@gaets04 5 жыл бұрын
Where does the speaker go ??
@fadhelahkhalaf4173
@fadhelahkhalaf4173 7 жыл бұрын
if i already creat file with sensor data , how can i read last line in the file not all data saved before ???
@mschoeffler
@mschoeffler 7 жыл бұрын
Two ideas come to my mind: a) You just loop through all the data and read each line. In each iteration, you store the value you read into a temp file. When the loop has finished, the last line will be stored in this temp file. This approach is not very efficient. b) If each line has a fixed length, you can use the "seek" function of the "File" class. The seek functions jumps directly to a position in your file. Just get the total file size and subtract the length of a single line. Then use seek and you should be able to obtain your last line. I guess, there are many more approaches to get the last line. I hope my hints were helpful!
@ernestorivero9909
@ernestorivero9909 2 жыл бұрын
Michael me gusto su video,pero déjeme plantearle algo a ver si usted me ayuda o le sirve como pie para un video nuevo.Yo descargué el software JINX, vay usted ha oodo hablar de este software,con el se hacen animaciones que luego se guardan en una targeta sd,en los videos que yo he visto sobre este software te enseñan hacer las animaciones y como guardarla en una targeta para que luego sea leída por un arduino nano,uno,o mega,pero que pasa que no te hablan del código que debes descargar en el arduino para que te lea las animaciónes que grabaste en la sd y enviarla a una matrix de led.Seria usted tan amable de orientarme donde buscar un código para programar el arduino y este me pueda leer las animaciones que hay en la memoria sd,le repito animaciones que grabe del software JINX.
@kingshahzad78
@kingshahzad78 5 жыл бұрын
Great Effort. Very informative
@neosinan1
@neosinan1 4 жыл бұрын
Thanks this helped a lot.
@didiersee
@didiersee 6 жыл бұрын
Congratulations best tuto thanks
@unglaubichuberlieber8048
@unglaubichuberlieber8048 5 жыл бұрын
well done !!!
@JeramieSaito
@JeramieSaito Жыл бұрын
Oh wow all those codes
@ardutronictechno8566
@ardutronictechno8566 7 жыл бұрын
where is the library and sorurce code.
@mschoeffler
@mschoeffler 7 жыл бұрын
The source code is here: www.mschoeffler.de/2017/02/22/how-to-use-the-microsd-card-adapter-with-the-arduino-uno/. In order to find/install the SD library: Open your Arduino IDE and then go to Sketch -> Include Library -> Manage Libraries... Next, a dialog should pop up. On the top is a search field, just enter "SD". Next a list is shown where you should find an entry "SD by Arduino, SparkFun". Do a left click on this list entry and then click on the "install" button.
@ardutronictechno8566
@ardutronictechno8566 7 жыл бұрын
thankyou mr.michael.
@KamalSharma-sq2wb
@KamalSharma-sq2wb 4 жыл бұрын
Great tutorial!!!!!! Thanks for explaining the code in such a clear manner
@nitrozeusfn6871
@nitrozeusfn6871 5 жыл бұрын
CODE?? please
@shivakumarveeramusti1934
@shivakumarveeramusti1934 7 жыл бұрын
HOW TO IDENTIFY THE FAT16 OR FAT32
@belhdawa
@belhdawa 6 жыл бұрын
write click on the SD card and choose get info(if you are using mac) or properties(if you are using windows) and you will see the type of your SD card
@mr.techinventor3463
@mr.techinventor3463 3 жыл бұрын
Arduino - How to Read SD Card Text File Line by Line
@dekipet
@dekipet 7 жыл бұрын
German english.... hard to listen. Sry mate.
@mschoeffler
@mschoeffler 7 жыл бұрын
What doesn't kill you makes you stronger ;)
@regmason1513
@regmason1513 6 жыл бұрын
Excellent tutorial.
@Darieee
@Darieee 6 жыл бұрын
Hah, awesome answer ! And awesome video, thanks !
@urugulu1656
@urugulu1656 6 жыл бұрын
at least he tries
Using SD Cards with Arduino - Record Servo Motor Movements
31:53
DroneBot Workshop
Рет қаралды 203 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Unlock the Power of SD Cards with Arduino! 🌡️💧
11:01
Enjoy Mechatronics
Рет қаралды 1,8 М.
Functions won’t eat arrays whole - Do this simple thing instead!
8:10
Programming Electronics Academy
Рет қаралды 12 М.
RFID Readers RDM6300 and RDM630 (Arduino-Tutorial) | UATS A&S #15
13:15
Michael Schoeffler
Рет қаралды 54 М.
Tutorial: Writing and reading to SD cards
15:55
Kris Kasprzak
Рет қаралды 10 М.
How to use LoRa Module with Arduino - Range Test - RYLR406 15KM
13:00
SD Cards Explained | Ask David Bergman
13:31
Adorama
Рет қаралды 43 М.
Tutorial: Using an SD Card with the Arduino for Data Logging
20:50
Optimize Your Arduino Code with Registers
5:09
Ben Finio
Рет қаралды 30 М.