0

Detect SD Card Removed from PLDuino
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Detect SD Card Removed from PLDuino

by mvieke on Tue Oct 09, 2018 10:15 am

I am writing an application for the PLDuino (product id: 3418), and I have trouble detecting if the SD card is inserted.

The schematics show that the arduino pin29 is connected to the MicroSD CD-DET pin. I assume this is a card detect signal.
excerpt from schematic - MicroSD socket CD is connected to Arduino D29.PNG
excerpt from schematic - MicroSD socket CD is connected to Arduino D29.PNG (170.47 KiB) Viewed 80 times


I have written some very basic code just to display the state of the CD-DET pin.
Code: Select all | TOGGLE FULL SIZE
#define CD_DET 29
pinMode(CD_DET, INPUT_PULLUP);
Serial.begin(9600);

while(1){
     if(digitalRead(CD_DET)){
          Serial.println("High");
     }
     else{
          Serial.println("Low");
     }
     delay(1000);
}


The Arduino serial monitor always reports "Low" regardless if the SD card is inserted or removed.

What am I missing?
mvieke
 
Posts: 1
Joined: Thu Nov 21, 2013 6:04 pm

Re: Detect SD Card Removed from PLDuino

by kcl1s on Thu Dec 06, 2018 11:31 am

Did you try the manufacturers support over on the digital loggers website? http://www.digital-loggers.com/plc.html It looks like they may even do phone support.

They have a great product. I just wish they had left a few pins open for regular Arduino I/O.

Fellow hobbyist
Keith

kcl1s
 
Posts: 954
Joined: Tue Aug 30, 2016 12:06 pm

Please be positive and constructive with your questions and comments.