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 ...
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 ...
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, ...
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, ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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.
...
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....
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 ...
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 ...
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. ...
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)...
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 '...
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, ...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sd-card × 377arduino-uno × 94
spi × 49
arduino-mega × 48
datalogging × 24
arduino-nano × 22
sd × 22
esp8266 × 21
esp32 × 21
shields × 17
arduino-ide × 16
serial × 15
programming × 15
c++ × 13
audio × 13
ethernet × 12
sd.h × 12
lcd × 11
arduino-due × 10
rtc × 10
sensors × 9
power × 9
wifi × 9
adafruit × 9
web-server × 8