Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

SD card...error: Card failed, or not present
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Wed Mar 04, 2020 6:49 pm

- Would these be indications of a possible conflict?

Yes. TX/RX are the labels for the hardware UART.

- Can you suggest a sketch that i could run to test for conflicts with the hardware UART?

It'll be more like things stop working. Like the issue you are having with relays attached to the SPI pins. There's not really a way to run a sketch to test for conflicts. The software will run, it just might not work as expected. It's more of a hardware issue -> multiple hardware items connected to the same pin.

- This being the case, how could these wires interfere with SD card recognition?

Unknown. They are still connected to additional circuitry even if the relays are notionally off.

adafruit_support_carter
 
Posts: 16820
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Thu Mar 05, 2020 9:53 am

Regarding bottom image of working OLD Adafruit Datalogging shield-ArduinoUno:
Note 1: we have pin 10 (LED) and other pins 2-12 (not 10) dedicated to 10 different reed switches.
Note 2: there is NO 2x3 header on this OLD Adafruit shield configuration.

Question1: How can I wire my NEW Adafruit Datalogging shield (top image) to have an LED and 10 reed switches?
Question2: If Q1 has no solution, Can i get an OLD Adafruit Datalogging shield configuration as in bottom image (since it works fine for my purposes)?
Attachments
NEWSideViewAdafruit_ArduinoUno_7991.png
Side view of NEW Adafruit Datalogging shield-ArduinoUno.
NEWSideViewAdafruit_ArduinoUno_7991.png (384.39 KiB) Viewed 83 times
OLDWiring Adafruit Arduino Top_6141.png
Top view of wiring that worked on an OLD Adafruit Datalogging shield-ArduinoUno.
OLDWiring Adafruit Arduino Top_6141.png (664.7 KiB) Viewed 83 times

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Thu Mar 05, 2020 7:50 pm

On that OLD example - you are able to both talk to the SD card and drive relays on pins 12 and 11?

adafruit_support_carter
 
Posts: 16820
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Fri Mar 06, 2020 10:03 am

Yes. that is correct (and shown in the previous picture).

UPDATE: on the NEW Adafruit Data logging shield, i did as suggested and pulled the wires coming from pin 11 and pin 12.
RESULT: The SD card is recognized just fine now as you anticipated.

So, the (either/or) QUESTION remains:
a) Is there one or more pin configuration(s) that will work for my 10 wires/reed switches on the NEW Adafruit Data logging shield? <OR>
b) Can i get an OLD Adafruit Data logging shield, that i know works?

thanks!

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Fri Mar 06, 2020 3:20 pm

a) Is there one or more pin configuration(s) that will work for my 10 wires/reed switches on the NEW Adafruit Data logging shield?

It looks like you aren't using all the analog IO pins. Those can work as digital IO also. Can you move to those?

b) Can i get an OLD Adafruit Data logging shield, that i know works?

Sorry, they are no longer in production.

adafruit_support_carter
 
Posts: 16820
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Mon Mar 09, 2020 8:15 am

Problem with Analog pins:
We are currently using the Button library for it's "uniquePress" method (https://playground.arduino.cc/Code/Button/). Unfortunately it appears to be hard-coded to use digitalRead and not configurable for analog.
QUESTION 1: Is there an alternative library we could use that can take advantage of both digital and analog pins with a similar DEBOUNCE function to determine unique button presses?

QUESTION 2: Do i have revision B or revision C of the data logger shield? (https://learn.adafruit.com/adafruit-dat ... /downloads)

QUESTION 3: Would it also be prudent to pull the LED from pin10 and just use the data logger shield SPI (e.g. as in the Blink sketch)?
thanks!

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Mon Mar 09, 2020 1:38 pm

You can look at the silk label here to check board version:
board.jpg
board.jpg (61.79 KiB) Viewed 61 times


I'm not sure of what other libraries may work for your application.

adafruit_support_carter
 
Posts: 16820
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Mon Mar 09, 2020 2:03 pm

I don't understand, the silk label just says what is shown: "Datalogging Arduino Shield"?

Could I use pin 10 (currently LED) as a 9th reed switch (digitalRead Button)?

I'm getting frustrated with the loss of functionality in the newer shields and limited number of fix options.. Please advise!

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Mon Mar 09, 2020 2:25 pm

I don't understand, the silk label just says what is shown: "Datalogging Arduino Shield"?

Then it matches the Rev C silk:
https://learn.adafruit.com/adafruit-dat ... print-12-2

You'll need to use the available information on the shield to find answers to your other questions since they are specific to your application.

adafruit_support_carter
 
Posts: 16820
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Thu Mar 12, 2020 11:00 am

Rev C schematic https://learn.adafruit.com/adafruit-dat ... print-12-2

Shows digital I/O pins 1 and 2 available, but they are really unavailable because they are attached to the Arduino Uno TX/RX for the hardware UART, correct?

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Tue Mar 17, 2020 5:45 pm

Ok, I've rewired my Data logging shield, using digital pins 2-7 for my button switches and digital pin 8 for my LED.
With this configuration, everything seems to be working fine, except for logging “Date,Time” on the SD card.
I think it is a RTClib (ds1307) problem in my sketch, because i get no Serial Monitor readout at all on the ds1307 example sketch (57600 baud; https://cdn-learn.adafruit.com/download ... 1584469470)
AND the ’softrtc’ example sketch works (uses millis() & timer). Here is an example of the Serial Monitor readout:
15:27:14.990 -> 2020/3/17 15:26:51
15:27:15.025 -> seconds since 1970: 1584458811
15:27:15.025 -> now + 7d + 30s: 2020/3/24 15:27:21

Q1: How do I fix this issue?
Q2: Could it be a WIRE issue? The i2c scanner example sketch (under WIRE) scans but doesn’t see anything:
// This sketch tests the standard 7-bit addresses
//Devices with higher bit address might not be seen properly.
Please help.

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Wed Mar 18, 2020 11:30 am

Sorry for sending a message before your reply, but there are updates/additions to the previous message (see below questions).

Q1: WIRE: How do i fix my i2c connection?
Q2: Does this involve a) setting Arduino Network preferences and/or b) updating WiFi101/WiFiNNA firmware/upload Certificates to WiFi module? (Please specify how.)
Q3: RTC: How do i get the PCF8523 working?

ADDED INFO: My port info is: /dev/cu.usbmodem14101 (Arduino Uno), My SSL domain is "arduino.cc:443"
I see that my Rev C Data logging shield uses a PCF8523 (not DS1307) RTC connected via i2c (https://learn.adafruit.com/adafruit-dat ... print-12-2). Unfortunately, when i run the RTClib PCF8523 sketch I get no Serial Monitor output.
Also, when I run the Wire i2c scanner, it now gives me a time-stamp and "Scanning..." output, but never finds/outputs an address.
And none of the WiFiNNA sketches are working. Here's the error message for Check Firmware Version:
Error compiling for board Arduino Uno.
Arduino: 1.8.12 (Mac OS X), Board: "Arduino Uno"
/Users/demetrispyropoulos/Documents/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp: In static member function 'static void SpiDrv::begin()':
/Users/demetrispyropoulos/Documents/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:87:24: error: 'PINS_COUNT' was not declared in this scope
if (SLAVERESET > PINS_COUNT) {
^~~~~~~~~~
/Users/demetrispyropoulos/Documents/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:87:24: note: suggested alternative: 'PING_CMD'
if (SLAVERESET > PINS_COUNT) {
^~~~~~~~~~
PING_CMD
/Users/demetrispyropoulos/Documents/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:97:15: error: 'NINA_GPIO0' was not declared in this scope
pinMode(NINA_GPIO0, OUTPUT);
^~~~~~~~~~
/Users/demetrispyropoulos/Documents/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp: In static member function 'static int SpiDrv::available()':
/Users/demetrispyropoulos/Documents/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:565:25: error: 'NINA_GPIO0' was not declared in this scope
return (digitalRead(NINA_GPIO0) != LOW);
^~~~~~~~~~
exit status 1
Error compiling for board Arduino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Wed Mar 18, 2020 5:30 pm

Sorry again, but i think i found something important:
I think I missed an important step in wiring and configuration: https://learn.adafruit.com/adafruit-dat ... and-configIf you are using the shield with a 3.3V logic Arduino, you may want to change the Vio jumper. This is what the 10K pullups for I2C are pulled up to. Honestly, the pullups are very weak so if you forget, it's not a big deal. But if you can, cut the small trace between the center pad and 5V and solder the other side so that Vio is connected to 3V.
My Rev C Data logging shield with a PCF8523 RTC says 3V IOr 5V and has NO trace between the center pad and 5V (or 3V for that matter).
QUESTION: Which one should I solder the center pad to?

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Wed Mar 18, 2020 6:38 pm

QUESTION: Which one should I solder the center pad to?

Neither. On the Rev C version of the shield it is routed to the IOREF pin on the UNO. So it will automatically be set to the 5V logic level of the UNO.

adafruit_support_carter
 
Posts: 16820
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Thu Mar 19, 2020 8:42 am

Then, this sends us back to my previous set of questions.
Please reply to them.
Thanks!

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Please be positive and constructive with your questions and comments.