element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum sketch problem.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 2 replies
  • Subscribers 416 subscribers
  • Views 339 views
  • Users 0 members are here
  • arduino
Related

sketch problem.

e14 Contributor
e14 Contributor over 12 years ago

Greetings

I have successfully used the sd libraries to read cardinfo.  I have found that the sd card directory gets scambled by the datalogger as it written. The datalog.txt file gets created and seems to contain correct data,  however the other files on card are corrupted.  Any help with this would be greatly appreciated.  Thank you in advance. I do hope I have posted in the correct spot.

  • Sign in to reply
  • Cancel
Parents
  • neilk
    0 neilk over 12 years ago

    Hi Tony,

     

    That's a bit of a mystery; I've just created several .txt files on an SD card at root level and a 2 more, inside a folder. Cardinfo reports everything it should.

     

    I then ran the datalogger example for a minute or so, then reloaded the cardinfo sketch & everything was still OK, including the creation of datalog.txt. I pulled the card and checked it on my PC, including reading the files - everything was OK.

     

    Does cardinfo return the type of SD card? Mine is a type 2 microsd card and I'm running it in the Ethernet Shield.

     

    Sorry I can't be of any help

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • neilk
    0 neilk over 12 years ago

    Hi Tony,

     

    That's a bit of a mystery; I've just created several .txt files on an SD card at root level and a 2 more, inside a folder. Cardinfo reports everything it should.

     

    I then ran the datalogger example for a minute or so, then reloaded the cardinfo sketch & everything was still OK, including the creation of datalog.txt. I pulled the card and checked it on my PC, including reading the files - everything was OK.

     

    Does cardinfo return the type of SD card? Mine is a type 2 microsd card and I'm running it in the Ethernet Shield.

     

    Sorry I can't be of any help

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • e14 Contributor
    0 e14 Contributor over 12 years ago in reply to neilk

    Thank you for your help

     

    I haven't had time to prove it but I think the issue is the files I put on the SD prior to using it were not 8.3 format and perhaps the FAT that it expected was not correct. I had just copied them from my photo library. I will be continuing my search for answers with this. Regardless the FAT was certainly scrambled, not something that should happen even if FAT was wrong type to use.

    Cardinfo output

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

     

    Card type: SD1

    Volume type is FAT16

    Volume size (bytes): 998375424

    Volume size (Kbytes): 974976

    Volume size (Mbytes): 952

     

    Files found on the card (name, date and size in bytes):

    DCIM/         2013-10-12 12:33:28

    BLUEHI~1.JPG  2006-02-28 08:00:00 28521

    SUNSET.JPG    2006-02-28 08:00:00 71189

    WATERL~1.JPG  2006-02-28 08:00:00 83794

           

    after runing Dataloger

     

    Cardinfo output

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

      Card type: SD1

      Volume type is FAT16

     

     

    Volume size (bytes): 998375424

    Volume size (Kbytes): 974976

    Volume size (Mbytes): 952

     

    Files found on the card (name, date and size in bytes):

    IM@@@@@.@!

     

     

    There are several more entries with non printable chars that follow this

    four lines down is the file DATALOG.TXT

     

     

     

    Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube