Go Down

Topic: uint64_t in Serial.print (Read 4 times) previous topic - next topic

robtillaart


Code: [Select]
  // Serial.print("Volume size (bytes): ");
  // Serial.println(volumesize);

becomes

Code: [Select]

  Serial.print("Volume size (bytes): ");
  uint64_t xx = volumesize/1000000000ULL;

  if (xx >0) Serial.print((long)xx);
  Serial.print((long)(volumesize - xx*1000000000));


give it a try
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Steve Spence - KK4HFJ

I get:

Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT32

Volume size (bytes): 31099904
Files found on the card (name, date and size in bytes):
DCIM/         2011-06-20 14:58:52
 100_PANA/     2011-06-20 19:07:48
   P1000812.JPG  2011-09-08 09:19:54 4158647
   P1000781.JPG  2011-08-20 21:02:02 4309863
   P1000813.JPG  2011-09-08 09:20:00 4258311
Steve Spence - ET/AT/R&D KK4HFJ

robtillaart

Is this what you expected? if not what did you expect?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Steve Spence - KK4HFJ

I was expecting somewhere around 16,000,000,000 bytes .....
Steve Spence - ET/AT/R&D KK4HFJ

robtillaart

can you post your complete code again?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up