# SD card cannot be opened twice?

**URL:** <https://forum.arduino.cc/t/sd-card-cannot-be-opened-twice/621596>\
**Category:** Storage\
**Created:** [November 19, 2019, 3:11pm UTC](https://forum.arduino.cc/t/sd-card-cannot-be-opened-twice/621596 "2019-11-19T15:11:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stockbridge\_InvenTeam](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Stockbridge\_InvenTeam](https://forum.arduino.cc/u/Stockbridge_InvenTeam)\
**Post date:** [November 19, 2019, 3:11pm UTC](https://forum.arduino.cc/t/sd-card-cannot-be-opened-twice/621596/1 "2019-11-19T15:11:57Z")

</div>

Alright, I have this code that is just supposed to write a few lines to the SD card per loop. The problem being, that the SD card for some reason has error when I try to open a file twice (after closing it). Here's my code, please help.

> **[//\*\*\*\*\*\*\*\* Libraries \*\*\*\*\*\*\*\*\*\*\*#include #include](https://pastebin.com/WDLsw56b)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

---

<div class="post-metadata">

**Author:** ![ieee488](https://avatars.discourse-cdn.com/v4/letter/i/d2c977/32.png) [@ieee488](https://forum.arduino.cc/u/ieee488)\
**Post date:** [November 20, 2019, 8:06pm UTC](https://forum.arduino.cc/t/sd-card-cannot-be-opened-twice/621596/2 "2019-11-20T20:06:03Z")

</div>

> Stockbridge\_InvenTeam:  
> Alright, I have this code that is just supposed to write a few lines to the SD card per loop. The problem being, that the SD card for some reason has error when I try to open a file twice (after closing it). Here's my code, please help.
> 
> [//\*\*\*\*\*\*\*\* Libraries \*\*\*\*\*\*\*\*\*\*\*#include \<SparkFun\_Qwiic\_Relay.h\>#include \<U - Pastebin.com](https://pastebin.com/WDLsw56b)

Post your code using code tags if you expect help.  
There is a sticky at the top of this forum explaining how to use this forum.

.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 4:34pm UTC](https://forum.arduino.cc/t/sd-card-cannot-be-opened-twice/621596/3 "2021-05-06T16:34:46Z")

</div>

Closed on May 6, 2021, 4:34pm UTC


