arduino-libraries / SD

SD Library for Arduino

Home Page:http://arduino.cc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix example ReadWrite

idealsmurffittrainer opened this issue · comments

I think there is i some mistake in exaple ReadWrite. In code below is pointless while loop which burdens CPU. I'll change if for while and "while(1);" remove
if (!SD.begin(4)) { Serial.println("initialization failed!"); while (1); }

I agree with you, we should at least change the error message with something as I proposed in #73

Thanks for taking the time to submit an issue @idealsmurffittrainer.
This perpetual loop is intentional. Continuing with the sketch would be pointless and confusing to the user after the SD card initialization failed.