microSD on Redboard Turbo

I am looking to see if anyone has a microSD working with the redboard Turbo. I can not get any product to work.

I have tried

  • Transflash BOB-00544. The card always fails to sd.init; I think the SPI does not work, but it may be that the sd library is the problem. The sd.init fails when it does card.init. Works fine on Arduino Mega, so I assume there is a problem in the board core for the SAMD21. I don’t have any other SPI peripherals so I can’t test SPI alone. I am using the example sketches to test, with various modifications as I try different things.

  • The microSd level shifting DEV-13743. I guess this is really for 5V systems? Acts the same as the Transflash - SPI gets no results, works fine on Mega.

  • Qwicc OpenLogger. Connects OK over I2C, but the data written to the disk is bad - it drops a lot of characters. The searchDirectory function does not work correctly. I have not tested all the other functions, since it is unusable if it drops data. Works fine on the Mega. My test is based on the datalogger example sketch.

  • Artemis OpenLogger - this doesn’t fit my needs, since it only logs data directly from a predefined list of sensors. I think one can write code for additional sensors? However, I need to log arbitrary strings like error messages, debugging messages, etc., which I think it does not do. It is also a bit pricey when I need to buy 12 of them :cry:

So, it appears the SAMD21 systems have no way to log data to disk? If anyone has example code which works with some device, I would love to see it.

Anything that uses SoftwareSerial won’t work on SAMD designs; use HardwareSerial and/or SERCOM assigning instead :slight_smile:

Hmm, I am not aware that I am using SoftwareSerial or HardwareSerial.

a) How would I know which I am using? Is SPI or the SD using one by default? In the SD library I did notice some checks for whether SoftwareSerial is #defined, but I don’t know where this would be selected. I didn’t see it in the SD.cpp or SD.h files, but could have missed it. There are a lot of files there.

b) How would I change to HardwareSerial? Perhaps there is an example somewhere?

I thought SPI is already using an assigned Sercom?