Axiometa
SD Card Adapter
SD Card Adapter
SKU:AX22-0029
58 in stock
Regular price
$3.39
Regular price
Sale price
$3.39
Unit price
per
Taxes included.
Shipping calculated at checkout.
Couldn't load pickup availability

Technical Details
Pinout
Arduino Example Snippet
#include "SdFat.h" //by Bill Greiman
#define SPI_SCK 13
#define SPI_MISO 12
#define SPI_MOSI 11
#define SPI_CS 14
SPIClass spiSD(HSPI);
SdFat sd;
SdFile file;
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("\n=== SD Card Test ===\n");
// Initialize SPI
spiSD.begin(SPI_SCK, SPI_MISO, SPI_MOSI, SPI_CS);
// Initialize SD card
if (!sd.begin(SdSpiConfig(SPI_CS, SHARED_SPI, SD_SCK_MHZ(4), &spiSD))) {
Serial.println("SD init failed!");
while(1);
}
Serial.println("SD card OK");
// Write test
Serial.print("Writing to test.txt... ");
if (file.open("test.txt", O_WRONLY | O_CREAT | O_TRUNC)) {
file.println("Hello from Axiometa!");
file.println("SD card is working!");
file.close();
Serial.println("Done");
} else {
Serial.println("Failed!");
}
// Read test
Serial.print("Reading test.txt... ");
if (file.open("test.txt", O_RDONLY)) {
Serial.println("\n--- File Contents ---");
while (file.available()) {
Serial.write(file.read());
}
Serial.println("--- End ---");
file.close();
} else {
Serial.println("Failed!");
}
Serial.println("\nTest complete!");
}
void loop() {
// Nothing to do
}