esp32 sd card | Sololearn: Learn to code for FREE!


esp32 sd card

Does anyone know of a good library for the esp32 that can read and write .dat files?

7/6/2021 12:02:33 PM


8 Answers

New Answer


The Arduino Yun is not a simple microcontroller board like the uno or mega. The yun contains two processors. An atmega32 microcontroller and an Atheros ar9331 system on chip (SoC) with 64Mb of ram. It would be cheaper to use an older model raspberry pi. Microcontrollers are used for cost sensitive applications with low computational and memory requirements. You match the microcontroller to the application. Though sometimes you have to use what you have on hand. The design depends on what you are trying to do. Programmng resource constrained embedded microcontroller systems is very different to programming pc or mobile applications. They each have different design philosophies and design patterns.


Do a web search for "esp32 sd card library" and you will get lots of hits. Take your pick.

+2 Typically in a data logging application the Arduino, or esp32, device simply logs the data to the sdcard. At best there may be an option to transmit the data over a communications channel (wifi, serial, usb, spi etc). The processing of the data is then performed by a more powerful device like a laptop, pc, tablet, or in the cloud. The AVR processors in Arduinos and esp32s have limited ram and processing power.


You bring up a very interesting point. What is your opinion on using a microprocessor such as the one in the arduino yun rev 2 to do the processing?


I see. Thank you very much for the very insightful advice!


Yes, well iā€™m sorry I should clarify. Most sd card libaries are perfect for what i need. Iā€™m more looking for a resource on how to read and write into .dat files


Ah, well that makes a little bit more sense lol. Do you happen to know of any examples of code processing the data?


There is no set format for a .dat file. The extension simply means "data". The format can be anything you want. For simplicity many people use a csv format of one record per line. Since your program is writing to this file you should know the format of the file and be able to read it. The sdcard library simply provides the file system to locate and access the file. Your code must do the actual processing of the data.