{"id":250,"date":"2015-05-26T21:52:35","date_gmt":"2015-05-26T19:52:35","guid":{"rendered":"http:\/\/tronche.com\/blog\/?p=250"},"modified":"2019-01-27T20:56:59","modified_gmt":"2019-01-27T19:56:59","slug":"sd-card-logging-working","status":"publish","type":"post","link":"https:\/\/tronche.com\/blog\/2015\/05\/sd-card-logging-working\/","title":{"rendered":"SD card logging working"},"content":{"rendered":"\n<p>I&#8217;m using SdFat (very simple, works very well). I&#8217;ve \n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#define SD_SPI_CONFIGURATION 1<\/code><\/pre>\n\n\n\n<p>in SdFatConfig, that is using native <em>Teensy<\/em> SPI library since I think it&#8217;ll perform better than SdFat Arduino-targeted &#8220;fast SPI&#8221; and (obviously) software implementation.\n<\/p>\n\n\n\n<p>I&#8217;m using pin 14 for the clock, so I keep the control of the LED \non pin 13. CS is on pin 15, and remember I&#8217;m using pin 16 (A2) to sense \navailable voltage for the sd-card unrelated battery level monitoring \npart.\n<\/p>\n\n\n\n<p>Log file is reopened every 10 seconds, so\n<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>it flushes data<\/li><li>if something went wrong, we have a new chance to reopen the file every 10 secs.<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>I&#8217;m using SdFat (very simple, works very well). I&#8217;ve in SdFatConfig, that is using native Teensy SPI library since I think it&#8217;ll perform better than <a class=\"mh-excerpt-more\" href=\"https:\/\/tronche.com\/blog\/2015\/05\/sd-card-logging-working\/\" title=\"SD card logging working\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[95],"tags":[],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-95"],"_links":{"self":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":1,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":251,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts\/250\/revisions\/251"}],"wp:attachment":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}