You are viewing an older revision! See the latest version
Cool Components Workshop Board
The workshop breakout board is a simple, compact board for experimenting with the Mbed. It offers a micro SD card slot, USB A, USB B, and ethernet port (with magnetics). In addition, each mbed pin can be connected to via a solderless header.
Orientation : A simple thing, but lots of people get it wrong. The mbed should be inserted into the board socket so that its USB mini B connector is directly over the mini SD slot.
SD Card Test Code : (This code or probably the library it uses does not work with 100% of SD cards)
#include "mbed.h" #include "SDFileSystem.h" SDFileSystem sd(p5, p6, p7, p8, "sd"); // mosi, miso, sclk, cs, name DigitalOut myled1(LED1); DigitalOut myled3(LED3); int main() { printf("Hello World!\n"); myled3=1; FILE *fp = fopen("/sd/sdtest.txt", "w"); if(fp == NULL) { error("Could not open file for write\n"); myled1=1; myled3=0; } fprintf(fp, "If you're reading this text in a file, your SD card has been written to..."); fclose(fp); }