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

In short I am going to say NO.

The flash is too small to adequately run the SD library as well as the rest of your Arduino code.

The RAM is also underpowered for what is needed to properly access files on an SD card.

Having said this, I am sure there are some clever software engineers that could write a cut down SD card library to do limited commands. Overall this is too hard for the beginner - Just buy an Arduino Uno/Mega/Due and avoid the unnecessary hassle.


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 an incoming data stream to the SD card filesystem is probably not.


#include <SPI.h>                                
#include <SD.h>

File file;                                     
int const pinCS = 2;

void setup()
 
{
SD.begin(pinCS);                               
file = SD.open("Test.txt", FILE_WRITE);        
file.println("anything");                     
file.close();}                                

void loop()                                     
{}

This Arduino(ATmega) code creates to SD card a file "Test.txt" and records there a text "anything".

Dear Arduino experts, pls kindly, let me ask you, rewrite this code to ATtiny85. It can helps to many Arduino hobby men. Josef