Sd card
Dependencies: mbed SDFileSystem
Revision 4:33450cfd53f3, committed 2022-02-06
- Comitter:
- mariangelamone
- Date:
- Sun Feb 06 20:30:37 2022 +0000
- Parent:
- 3:f281a7095433
- Commit message:
- scrittura su sd card
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f281a7095433 -r 33450cfd53f3 main.cpp --- a/main.cpp Fri Feb 04 14:33:57 2022 +0000 +++ b/main.cpp Sun Feb 06 20:30:37 2022 +0000 @@ -1,21 +1,14 @@ -/* -SDカードに整数を書き込む. -<pin接続> -NSS: pin25 --- pin2 CD/DAT3 -SCK: pin26 --- pin5 CLK -MISO:pin27 --- pin7 DAT0 -MOSI:pin28 --- pin3 CMD -*/ + #include "mbed.h" #include "SDFileSystem.h" -DigitalOut myled(PB_1); //pin15 +DigitalOut myled(PB_1); Serial pc(SERIAL_TX, SERIAL_RX); -SDFileSystem sd = SDFileSystem(PB_5, PB_4, PB_3, PA_15, "sd"); //pin28,27,26,25 +SDFileSystem sd(D11, D12, D13, D4, "sd"); int main(){ - wait(1.0); //気持ち + wait(1.0); pc.printf("Start.\n\r"); FILE *fp = fopen("/sd/test.csv", "w");