Last active
October 30, 2015 19:44
-
-
Save michaelsarduino/556636295f02f6542f16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <SD.h> | |
File Datei; | |
void setup() { | |
Serial.begin(9600); | |
if(!SD.begin(10)) | |
{ | |
Serial.println("Verbindung zur SD Karte fehlgeschlagen"); | |
return; | |
} | |
Datei = SD.open("beispiel.txt", FILE_WRITE); | |
Datei.println("Dieser Text wird in die Datei geschrieben"); | |
Datei.close(); | |
Datei = SD.open("beispiel.txt", FILE_READ); | |
while (Datei.available()) { | |
Serial.write(Datei.read()); | |
} | |
Serial.println(" "); | |
Datei.close(); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment