Hi,
I'm brand new to Teensy and just wanting to sanity check something:
I've plugged together a Teensy 3.2 and the WIZ820io & Micro SD Card Adaptor.
Am I understanding the description correctly - that the arduino std SD libraries should just work out of the box with this setup?
I've tried the raw Arduino CardInfo example exactly as is and my own shorter version just checking the SDcard with the begin function (see below) but the serial output in both is always just that there's something wrong - the first card check doesn't work.
**********Serial output
Ping initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
****************
So my sanity check question is just - should this work (in which case my physical connections somewhere are wrong - any suggestions for debugging) or is there something else to change in the code?
Much thanks!
I'm brand new to Teensy and just wanting to sanity check something:
I've plugged together a Teensy 3.2 and the WIZ820io & Micro SD Card Adaptor.
Am I understanding the description correctly - that the arduino std SD libraries should just work out of the box with this setup?
I've tried the raw Arduino CardInfo example exactly as is and my own shorter version just checking the SDcard with the begin function (see below) but the serial output in both is always just that there's something wrong - the first card check doesn't work.
**********Serial output
Ping initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
****************
So my sanity check question is just - should this work (in which case my physical connections somewhere are wrong - any suggestions for debugging) or is there something else to change in the code?
Much thanks!
Code:
#include <SD.h>
#include <SPI.h>
const int ledPin = 13;
const int chipSelect = 4;
void setup() {
//Setup
Serial.begin(9600); //USB is 12Mbps
Serial.print("\nInitializing system");
pinMode(ledPin, OUTPUT);
//Recommended Initialisation for teensy WIZ820io & Micro SD Card Adaptor
pinMode(9, OUTPUT);
digitalWrite(9, LOW); // reset the WIZ820io
pinMode(10, OUTPUT);
digitalWrite(10, HIGH); // de-select WIZ820io
pinMode(4, OUTPUT);
digitalWrite(4, HIGH); // de-select the SD Card
if (!SD.begin(4)) {
Serial.println("Ping 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.");
}
}
void loop() {
blip(1000);
}
void blip(int len){
digitalWrite(ledPin, HIGH);
delay(len);
digitalWrite(ledPin, LOW);
delay(len);
}