I'm discovering that the 'card detect' switch on my Adafruit breakout board is flaky at best. It used to work when I first got it but it quickly started to fail. I'm assuming normal wear takes over after several plug ins and outs, so now I can't rely on it. Some times it stays engaged when I pull the card out, other times it triggers as soon as I slide a card in the slot, but haven't pushed it all the way in yet. Some times it just doesn't work unless I wiggle the card a bit. So, I can't rely on it. I honestly don't know if it broke inside, or if a pad came loose, it's just hard to look at the internals.
The other thing I also discovered is that the switch engages as I'm pushing the card in. I was hoping it only triggered when the card is actually locked in place. So rather than instantly reacting to the switch, I need to somehow build a delay and check it again. Sort of like a debounce.
So, I have two questions:
a) is it normal for that (internal) switch to fail over time?
b) how else can I do a card detect, maybe through software?