Hot answers tagged

2

Read the values into an array big enough to store them Write the array with the write(const uint8_t *buffer, size_t size) method. Each write then gives you a block of binary data (512 values, 1024 bytes if they're 16-bit integers) written to the SD card. What you do with it then is up to you. Note: an Arduino UNO only has 2kB of memory. If you have 512 ...


2

Unfortunately the DFPlayer cant write that data to the SD card. The Arduino has some non volatile memory of its own built in though. Theres 1K of EEPROM for the UNO. Notes on how to use it here: https://www.arduino.cc/en/Reference/EEPROM If you can get what you need to done in 1K and its not important to your project that you be able to unplug the SD card ...


2

You only need to open the file with FILE_WRITE and use file.seek(EOF) to go to de end of the file. After that you can write whatever you want that will be appended to the end of the file. File outputFile = SD.open(LOG_FILE, FILE_WRITE); outputFile.seek(EOF); outputFile.println("Appended to the EOF");


2

Not with an ATTiny85, and not with so few pins, no. However, all is not lost. The ATTint85 has 512 bytes of EEPROM inside it where you can store your login details. All you need is some way of telling setting that data in your sketch from the PC - and the simplest way is probably through a USB serial connection. If you don't have a serial connection ...


1

Ok i found the solution. It was not too complicated. I just assumed the problem was in the code. This works well enough (dont ask me about the counter--) unsigned short EKG_recording::count_files_from_SD() { root = SD.open("/"); root.rewindDirectory(); //Sets to beginning of directory while (true) { File entry = root.openNextFile(); if(!...


1

SD cards work with SPI. This needs only one pin per device (SlaveSelect) but 3 pins for the other common signals ( MISO / MOSI / SCK ) Card reader modules simply do some voltage level shifting (if at all). But, you need a lot of RAM to work with SD cards, as data transfer always happens in 512 byte "sectors". With a file system, you need at least two such ...


1

This is talked about in multiple Arduino threads. This thread, this thread & this thread are just 3 found. It appears reading and SDCard using an Arduino results in a text like character string. The task is to parse this (if necessary) and convert it to the desired individual values. The most efficient way to do this might be to use the toCharArray() ...


1

If you look in this library, you see: File SDClass::open(const char *filepath, uint8_t mode) { ... if ((mode & (O_APPEND | O_WRITE)) == (O_APPEND | O_WRITE)) { So you can use all these mode combinations (e.g. O_CREATE, O_APPEND, O_WRITE).


1

You can use the adapter because: the adapter uses an AMS1117 to generate 3.3V to supply the SD card and the level shifter the level shifter is a 74LVC125 which uses 3.3V and works with 3.3V (and accepts up to 5V as input level) The adapter works for 3.3V and 5V systems as long as 5V power is available.


1

For people having similar problems with creating multiple files on an SD card, it may be a memory issue. You need to have a certain amount of unused dynamic memory (about 300 bytes of free space, in my experience) in order to write to an SD card - and more if you are writing multiple files. Following the instructions on this page may help.


Only top voted, non community-wiki answers of a minimum length are eligible