Hello everyone,
i'm using this breakout-board: https://www.tindie.com/products/cburgess129/arduino-teensy4-teensy-40-expansion-board/#specs as preassembled version.
Since now i got something working with I2C and Wifi and a really basic type of http-server that will return some json, now i wanted to save some Data to an SD-Card, but it wont work
Tested example:
of course outputs the help-text
i'm developing with VSCode and PlatformIO, but also with Arduino 1.8.16 its the same ...
if i print BUILTIN_SDCARD i get "254" - is that correct?
Based on https://www.pjrc.com/teensy/card10b_rev2_web.pdf shouln't i set setMOSI to 35?
Currently i don't know where to start searching for the cause because i'm fairly new to this
the card is a sandisc 32GB, the smallest i could found in mediamarkt ^^
card is formated FAT32 and no problems with SD-Card-Reader in my PC
thanks in advance for any help
i'm using this breakout-board: https://www.tindie.com/products/cburgess129/arduino-teensy4-teensy-40-expansion-board/#specs as preassembled version.
Since now i got something working with I2C and Wifi and a really basic type of http-server that will return some json, now i wanted to save some Data to an SD-Card, but it wont work
Tested example:
Code:
#include <SD.h>
#include <SPI.h>
Sd2Card card;
//SPI.setMOSI(7); // Audio shield has MOSI on pin 7
//SPI.setSCK(14); // Audio shield has SCK on pin 14
void setup()
{
Serial.begin(9600);
master.begin(400 * 1000U);
pinMode(led, OUTPUT);
// configured = configure_sensor();
delay(2000);
if (!card.init(SPI_HALF_SPEED, BUILTIN_SDCARD)) {
Serial.println("initialization failed. Things to check:");
Serial.println("* is a card inserted?");
Serial.println("* is your wiring correct?");
Serial.println("* did you change the chipSelect pin to match your shield or module?");
return;
} else {
Serial.println("Wiring is correct and a card is present.");
}
}
i'm developing with VSCode and PlatformIO, but also with Arduino 1.8.16 its the same ...
if i print BUILTIN_SDCARD i get "254" - is that correct?
Based on https://www.pjrc.com/teensy/card10b_rev2_web.pdf shouln't i set setMOSI to 35?
Currently i don't know where to start searching for the cause because i'm fairly new to this
the card is a sandisc 32GB, the smallest i could found in mediamarkt ^^
card is formated FAT32 and no problems with SD-Card-Reader in my PC
thanks in advance for any help