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

+1

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

Builder212

8 Answers

New Answer

+1

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.

+4

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

+2

https://www.arduino.cc/en/Tutorial/LibraryExamples#sd-library 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.

+2

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?

+2

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

+1

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

+1

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

0

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.