Hot answers tagged

12 votes
Accepted

How to increase SD card write speed in arduino

OK. So, I tried the SDFat lib. This library is definitely better than the default SD library that comes with adruino. But that is not how I solved my problem of low data-rate. I followed the ...
Ashish Ranjan's user avatar
11 votes

How to use a microSD card reader with SCK instead of CLK?

SCK stands for SPI ClocK CLK stands for SPI CLocK Two different acronyms for the same thing.
Majenko's user avatar
  • 105k
9 votes

What do these pins mean? Where should I plug them in?

This is called the SPI interface (See Serial Peripheral Interface, Wikipedia. The pin names typically used for SPI are: GND : Power Ground VCC : Power input CS : Chipselect SCK/SCLK (SD-Clock): SPI ...
Michel Keijzers's user avatar
6 votes
Accepted

Reading bytes from a file on SD Card - Understanding Buffer

You don't have to, it's just one way of doing it. Basically the read function needs a pointer to a buffer to store the data in. By using an array with one entry you get a pointer to a buffer that is ...
Majenko's user avatar
  • 105k
6 votes
Accepted

How can I do web hosting having all the code of the site stored in a sd?

You wrote: the site does not have to be static but constantly updated with new temperature data. A good option is to use Ajax. The basic idea is to split the site in two parts: a static part, ...
Edgar Bonet's user avatar
  • 42.2k
5 votes
Accepted

SD card fails to initialize

The first thing to try is to use the 'proper' pins for the SPI: SCK to Pin 10 on Arduino ---> Pin 13 CS to Pin 11 on Arduino ---> Pin 10 MISO to Pin 12 on Arduino ---> Pin 12 MOSI to Pin 13 ...
Andology's user avatar
5 votes
Accepted

What is the best way to get more RAM for a sound buffer?

A simple SPI SRAM chip. Available up to 128KB, such as the 23LC1024: http://www.microchip.com/wwwproducts/en/23LC1024
Majenko's user avatar
  • 105k
5 votes
Accepted

Need help with 2X3 matrix for braille

First of all, may I say "Thank you" for helping your friend like that? I cannot think of a better way to use an Arduino than as a driver for a Braille display like you describe! As you know, Braille ...
5 votes
Accepted

Writing "theremin" outputs to a MIDI file on an SD card

The short answer would be "yes, it is possible". There are lots of gadgets around that record MIDI. They would have microprocessors in them, and they would have something like an SD card, ...
Nick Gammon's user avatar
  • 37.9k
5 votes
Accepted

Read one byte from file and convert to decimal

Ok, I got it working now, here's what was happening: Turns out the file wasn't being opened. Why? seems like there's a limitation on the filename length, I noticed this after adding the lines: root....
melev's user avatar
  • 71
4 votes

How to increase SD card write speed in arduino

Many factors would decide if you can reach this wanted speed. Only some of these. 1. Your Software The SdFat Library is faster than the standard SD Library of the Arduino IDE. It also has an easy to ...
William Roy's user avatar
4 votes

How to increase SD card write speed in arduino

Avoid the handshake getting a buffer! Use SD.write(buf,size); Hi every one, I'm working in a project with the same issue. I was following the same steps of yours and got exactly the same numbers. I'...
Pinipa's user avatar
  • 41
4 votes

Need help with 2X3 matrix for braille

Each character will be 6 bits (so let's use a byte to store it) and we'll use the following bit to LED mapping bit0 bit1 bit2 bit3 bit4 bit5 Now you just need an array of bytes where each byte ...
KennetRunner's user avatar
4 votes
Accepted

Understanding why should avoid “String” and alternative solutions

First, let me point out a problem in your code, completely unrelated to your question: AcX = Wire.read()<<8|Wire.read(); The C++ standard does not specify in which order the two reads will be ...
Edgar Bonet's user avatar
  • 42.2k
4 votes

Understanding why should avoid “String” and alternative solutions

Edgar answers your first question about String and printing very nicely. Majenko also has a nice description here of the pitfalls. Regarding your second question about GPS/efficiency/speed: use ...
slash-dev's user avatar
  • 2,029
4 votes

Can I connect an SD card shield to Digispark ATtiny85 board?

Yes you can connect it: http://elm-chan.org/fsw/ff/00index_p.html Your happiness depends on what you want to accomplish. Simple streaming, like feeding an FPGA with a bitstream is achievable. Logging ...
barbazoo's user avatar
  • 141
4 votes

Using a Micro SD card for data logging, bad idea? Reliable?

We've been maintaining a network of loggers (60+ currently deployed) using SD card connected directly to the SPI pins (see: http://www.mdpi.com/1424-8220/18/2/530 for details) and our experience is ...
Ed Mallon's user avatar
  • 101
4 votes

Arduino SD Card open file modes append / overwrite

The Arduino SD library is an Arduino wrapper of old version of SdFat library (put into utility subfolder of the SD library). This SdFat library has constants like O_READ, O_WRITE, O_APPEND. Arduino ...
Juraj's user avatar
  • 17.8k
4 votes

Arduino SD Card open file modes append / overwrite

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 ...
André Carvalho's user avatar
4 votes

Writing to sd card with a sampling rate 50ms or less? I have a sketch that writes to sd every 1s but jams at faster sampling rates. Please help?

Some tips: Do not open the open and close the file in every loop sequence (I think you can use the flush command to save/update the file. Do not save strings, but save the raw data and pulse string. ...
Michel Keijzers's user avatar
4 votes

What do these pins mean? Where should I plug them in?

CS = Chip select DI = Data In (MOSI) VCC SCK = Serial Clock GND DO = Data Out (MISO) CD (not sure what it stands for, but this pin isn't used when connecting to an Arduino. I think it's used for ...
Gerben's user avatar
  • 11.3k
3 votes
Accepted

What happens when there's no space left on SD card?

Open-source is just great. Lets have a look at the source code for SD. Here is what happens on write of a block. /** * Write data to an open file. * * \note Data is moved to the cache but may not ...
Mikael Patel's user avatar
  • 7,959
3 votes

using seek() in Arduino to go to the end of a variable-sized file

You can only seek to an absolute position from the start of the file. Fortunately there is the size() method that can tell you where the end is, though. file.seek(file.size());
Majenko's user avatar
  • 105k
3 votes
Accepted

SD.begin() fails second time

I know this question is relatively old but still, if you wnat to run SD.begin(chipselect); again first call if(root.isOpen()) root.close(); I added this to the library. This way SD.begin(chipselect) ...
Roschambo's user avatar
3 votes

Using TMRpcm library, the audio does not play

This is now 5 months later - but I recently had the same problem. Because the TMRpcm library plays through pulse width modulation, make sure your speakers are hooked up to a PWM capable pin. That ...
Jeff Fortune's user avatar
3 votes
Accepted

SD card initialization fails randomly

I have seen SD cards that do not like this section of code: // command to go idle in SPI mode while (cardCommand(CMD0, 0) != R1_IDLE_STATE) { if (((uint16_t)millis() - t0) > ...
slash-dev's user avatar
  • 2,029
3 votes

Can a 9V battery be used as a backup power supply (to Arduino Uno) while plugged directly into Vin and ground?

My problem with that is that the other side of the diode on the Arduino is normally powered up. So for example if you have a 12V supply in the power jack you'll have 11.3V at Vin (because of the diode ...
Nick Gammon's user avatar
  • 37.9k
3 votes

Can a 9V battery be used as a backup power supply (to Arduino Uno) while plugged directly into Vin and ground?

No, when you have 9V hooked up to Vin and 5V coming in from the USB, it will use power from the 9V battery, not usb and the battery will quickly be depleted.
mwwalk's user avatar
  • 446
3 votes

What is the best way to get more RAM for a sound buffer?

An FRAM chip? Non-volatile (though you don't need that) SPI or I^2C available on a breakout board from Adafruit Or roll you own from a bare chip, if you're handy with Surface Mount Devices.
JRobert's user avatar
  • 15.1k
3 votes
Accepted

Cannot open file with underscores using the SD library

[The SD library] uses short 8.3 names for files. source
Ignacio Vazquez-Abrams's user avatar

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