background image

 

 

 

 

 7 

 

 

  volumesize = volume.blocksPerCluster();    // clusters are collections of blocks 

 

  volumesize *= volume.clusterCount();       // we'll have a lot of clusters 

 

  volumesize /= 2;                           // SD card blocks are always 512 bytes (2 blocks are 1KB) 

 

  Serial.print("Volume size (Kb):  "); 

 

  Serial.println(volumesize); 

 

  Serial.print("Volume size (Mb):  "); 

 

  volumesize /= 1024; 

 

  Serial.println(volumesize); 

 

  Serial.print("Volume size (Gb):  "); 

 

  Serial.println((float)volumesize / 1024.0); 

 

 

 

  Serial.println("\nFiles found on the card (name, date and size in bytes): "); 

 

  root.openRoot(volume); 

 

 

 

  // list all files in the card with date and size 

 

  root.ls(LS_R | LS_DATE | LS_SIZE); 

 

 

 

 

void loop(void) { 

 

Содержание Whadda WPI304

Страница 1: ...USER MANUAL EN SD card logging module for Arduino WPI304 whadda com...

Страница 2: ...ons with reduced physical sensory or mental capabilities or lack of experience and knowledge if they have been given supervision or instruction concerning the use of the device in a safe way and under...

Страница 3: ...n Wiring and the Arduino software IDE based on Processing Additional shields modules components are required for reading a twitter message or publishing online Surf to www arduino cc for more informat...

Страница 4: ...4 Connection Connection to Arduino Uno Arduino WPI304 10 CS 11 MOSI 12 MISO 13 SCK GND GND 5V 5 V Connection to Arduino Mega Arduino WPI304 50 MISO 51 MOSI 52 SCK 53 CS GND GND 5V 5 V...

Страница 5: ...reated 28 Mar 2011 by Limor Fried modified 9 Apr 2012 by Tom Igoe modified 4 Sept 2020 by Midas Gossye Velleman include the SD library include SPI h include SD h set up variables using the SD utility...

Страница 6: ...YPE_SD1 Serial println SD1 break case SD_CARD_TYPE_SD2 Serial println SD2 break case SD_CARD_TYPE_SDHC Serial println SDHC break default Serial println Unknown Now we will try to open the volume parti...

Страница 7: ...locks are 1KB Serial print Volume size Kb Serial println volumesize Serial print Volume size Mb volumesize 1024 Serial println volumesize Serial print Volume size Gb Serial println float volumesize 10...

Страница 8: ...8 whadda com Modifications and typographical errors reserved Velleman Group nv WPI304_v01 Velleman Group nv Legen Heirweg 33 9890 Gavere...

Отзывы: