micro SD Card module, Normal SPI CS mode. detail : http://wizard.nestegg.jp/sd.html http://wizard.nestegg.jp/spisetting.html
main.cpp
00001 #include "mbed.h" 00002 #include "SDFileSystem.h" 00003 00004 SDFileSystem sd(p5, p6, p7, p8, "sd"); 00005 00006 int main() { 00007 printf("Hello World!\n"); 00008 00009 FILE *fp = fopen("/sd/sdtest.txt", "w"); 00010 if(fp == NULL) { 00011 error("Could not open file for write\n"); 00012 } 00013 fprintf(fp, "Hello fun SD Card World!"); 00014 fclose(fp); 00015 00016 printf("Goodbye World!\n"); 00017 }
Generated on Tue Jul 12 2022 21:39:37 by 1.7.2