Skip to main content
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
  • 106k
6 votes
Accepted

How can I do web hosting having all the code of the site stored on an 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
  • 45.1k
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
  • 38.9k
5 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
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

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
  • 111
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
  • 18.3k
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
3 votes

Multiple SPI device

Some card reaaders (as well as display boards with built-in sd socket) use 10-kOhm resistors in series to the CS, DIN and CLK lines, to perform a cheap 5V to 3.3V level translation. This is really not ...
next-hack's user avatar
  • 411
3 votes
Accepted

Failed to initialise SD card on Leonardo

A Leonardo has the SPI pins on the ICSP header, not on pins 11, 12, 13. And a Pro Micro has the SPI pins on 14, 15, 16.
gre_gor's user avatar
  • 1,682
3 votes
Accepted

ArduCAM OV2640 and microSD card module -- SPI problems

In this case, I don't think that a device is "using SPI to 'use up' the entire SPI bus so that other peripheral devices can't interact with the microcontroller". I think that your problem probably ...
sempaiscuba's user avatar
  • 1,042
3 votes
Accepted

Use SD Card while Pin 11 is being used for PWM

The program you link to does not take over pins 3, 9, 10 and 11, it takes over Timer 1 and Timer 2, which are used to provide PWM capability on those pins. This means you cannot do analogWrite() on ...
Edgar Bonet's user avatar
  • 45.1k
3 votes

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

Yes, read the MIDI file format specification. Create a single track midi file and append just note press / release commands / pitch or volume changes and delta times (reverse conversion of delta times ...
gabonator's user avatar
  • 371
3 votes
Accepted

Arduino UNO And SD Card Custom csPin

Pin 10 is special. It's the hardware chip select pin for SPI. It is integral to the SPI peripheral in the chip. That pin must be an OUTPUT for SPI to operate as master, or INPUT for it to operate as ...
Majenko's user avatar
  • 106k
3 votes
Accepted

Reading text from SD card is returning weird characters

The text file is not ASCII, it is UTF-8. You will either have to convert it to pure ASCII, or write (or obtain) a conversion routine to approximate the UTF-8 characters using ASCII on the Arduino. ...
Majenko's user avatar
  • 106k
3 votes
Accepted

Reading names of files on sd card returning odd file names

That's the way the FAT filesystem works. On the page you link to there's a link to a page on SDCardNotes. FAT file systems have a limitation when it comes to naming conventions. You must use the 8....
Dave Newton's user avatar
3 votes

listing sd card files on a tft screen

If I start listing the files, can I scroll up and down ? Because at some point the TFT screen will become full of text, and I don't want the text to be overwritten. If you program that kind of ...
Majenko's user avatar
  • 106k
3 votes
Accepted

Arduino SD Card open file modes append / overwrite

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 ...
Michel Keijzers's user avatar
3 votes
Accepted

Editing a particular position in a file stored in SD card

The problem is that you are opening the file with FILE_WRITE. That is a combined macro that is made up of: #define FILE_WRITE (O_READ | O_WRITE | O_CREAT | O_APPEND) The key one there is O_APPEND. ...
Majenko's user avatar
  • 106k
3 votes

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

CD could be one of two things: a) a simple mechanical switch on the socket, usually used for Card Detect. Measure from the pin to Gnd and see if contact is open/closed when a card is plugged in. b)...
CrossRoads's user avatar
  • 2,449
3 votes

Is there some hardware that can be used to upload sketch source code via USB flash disk (Automatically By plugging it in)

There is a solution with SD card and SD bootloader. You put a bin file on SD card, insert it into the SD adapter and power up the Arduino. The bootloader loads the bin file to flash memory. I use '...
Juraj's user avatar
  • 18.3k
3 votes

2 SPI devices conflict

I had the same problem with my SD card module. I don't have too much knowledge about all details, but it is related that most SD card modules (the simple ones) do not have tri-state functionality, ...
Michel Keijzers's user avatar
3 votes
Accepted

Writing a 1Mb bitmap to an SDcard with only 96kB RAM

You can write the file in chunks. As suggested by ocrdu in a comment, writing line by line is a good strategy. In order to keep the complexity of the code manageable, I would put the logic of deciding ...
Edgar Bonet's user avatar
  • 45.1k
3 votes
Accepted

Any way to use DMA to transfer data to SD Card in ESP8266

So, sorry for late response, i figured it out. Because it took lots of time for me and it might be a prevalent issue, i think it worth to contribute my experience for further similar issues. As ...
A.R.S.D.'s user avatar
  • 151
3 votes
Accepted

seeeduino can-bus shield v2: can't read can bus and write on SD card

Despite the "the library example must be correct, It's work for other people before you", I'm not sure a lot of people make it works. I've seen that even when the mcp2551 don't receive ...
Thanatheos's user avatar
3 votes

read first line from sd card and save the position for again reading from sd card

You should not need to save the position, the file knows where you last read from. You'd only need to manually save such information if you close the file and re-open it again, which unless you have a ...
Majenko's user avatar
  • 106k

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