Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed sd_kart_yazma_okma
Diff: main.cpp
- Revision:
- 2:279a4193cde4
- Parent:
- 1:2baac9785cda
- Child:
- 3:d8b420b7c7ff
--- a/main.cpp Sun Dec 29 07:37:59 2019 +0000
+++ b/main.cpp Mon Mar 02 11:01:21 2020 +0000
@@ -1,16 +1,16 @@
#include "mbed.h"
#include "SDFileSystem.h"
-SDFileSystem sd(PB_5, PB_4, PB_3, PA_8, "BTT"); // mosi, miso, sclk, cs(scl)
+SDFileSystem sd(D12, D11, D13, D10, "sd"); // mosi, miso, sclk, cs(scl)
unsigned char c;
int main()
{
- mkdir("/BTT", 0777);
+ mkdir("/sd", 0777);
//mkdir klasör oluşturur.
//0777 dosyaya veri yazıp okumayı etkinleştirir.
while(1) {
wait_ms(500);
- FILE *fp = fopen("/BTT/index.txt", "a");
+ FILE *fp = fopen("/sd/belge.txt", "a");
/* a - dosyanın içerisine var olan verinin yanına ekleme yapar
r - Dosyadan okuma yapar
w - Dosyadan verileri siler yeni veriyi ekler.
@@ -25,7 +25,7 @@
fprintf(fp, "ismek fatih bilisim okulu\n");
fclose(fp); //Dosya kapat
//
- FILE *fpr = fopen("/BTT/index.txt", "r");
+ FILE *fpr = fopen("/sd/belge.txt", "r");
//Okunacak dosya seçildi
//file end of. Okuma işlemi bitene kadar devam et.