Log on SD card

thanks!

  1. it still not solves my problem :frowning:
  2. I am using SD-Adapter for a Micro-SD card:
    SD and microSD flash memory cards - Kingston Technology
    and the event is raised only if I insert\eject the adapter. If I insert\eject the micro-SD-card while the adapter is still inserted, the event does not rise. :frowning:

Sorry I only just realised from the OP that you have a Spider. The events are different for a Spider with SD module.

https://www.ghielectronics.com/docs/96/sd-card-module


void ProgramStarted()
{
    sdCard.SDCardMounted += new SDCard.SDCardMountedEventHandler(sdCard_SDCardMounted);
    sdCard.SDCardUnmounted += new SDCard.SDCardUnmountedEventHandler(sdCard_SDCardUnmounted);
}
 
void sdCard_SDCardUnmounted(SDCard sender)
{
    Debug.Print("The SD card has been unmounted");
    Debug.Print("DO NOT try to access it without mounting it again first");
}
 
void sdCard_SDCardMounted(SDCard sender, GT.StorageDevice SDCard)
{
    Debug.Print("SD card has been successfully mounted. You can now read/write/create/delete files");
    Debug.Print("Unmount before removing");
}

@ wolfbuddy -

The use of these events need the SD_CD pin to be plugged, which seems not to be the case on every board…Right ?

I’m not the best person to answer that as this is all pretty new to me, but my understanding of it is that you are correct that not all the boards have the SD_CD pin. I couldn’t tell you which do though and looking at the document page again for the SD module I just realised that I posted events for mounting and unmounting, rather than card insertion and removal. The schematic does show the SD_CD pin though.

I’m sure that someone from GHI will be along to clear up the confusion (that I’ve probably created myself!! :p).

The thread is long and I am not sure what the question is exactly is :slight_smile:

Please start a fresh question with details so we can give you better answer please.