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:
- 1:2baac9785cda
- Parent:
- 0:ea4c45f3cff7
- Child:
- 2:279a4193cde4
--- a/main.cpp Wed Oct 16 08:48:13 2019 +0000
+++ b/main.cpp Sun Dec 29 07:37:59 2019 +0000
@@ -1,15 +1,16 @@
#include "mbed.h"
#include "SDFileSystem.h"
-SDFileSystem sd(PC_12, PC_11, PC_10, PD_2, "sd"); // mosi, miso, sclk, cs(scl)
+SDFileSystem sd(PB_5, PB_4, PB_3, PA_8, "BTT"); // mosi, miso, sclk, cs(scl)
unsigned char c;
int main()
{
- mkdir("/sd", 0777);
+ mkdir("/BTT", 0777);
//mkdir klasör oluşturur.
//0777 dosyaya veri yazıp okumayı etkinleştirir.
while(1) {
- FILE *fp = fopen("/sd/ornek.txt", "a");
+ wait_ms(500);
+ FILE *fp = fopen("/BTT/index.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.
@@ -21,10 +22,10 @@
else {
//Sd karta yazar
- fprintf(fp, "mehmet akif arvas");
+ fprintf(fp, "ismek fatih bilisim okulu\n");
fclose(fp); //Dosya kapat
//
- FILE *fpr = fopen("/sd/sicaklik.txt", "r");
+ FILE *fpr = fopen("/BTT/index.txt", "r");
//Okunacak dosya seçildi
//file end of. Okuma işlemi bitene kadar devam et.