Skip to content

Commit f4b9c8c

Browse files
authored
Fix SD.open() for append
The SD.open() method only accepts FILE_READ and FILE_WRITE -- FILE_APPEND is not defined. FILE_WRITE defaults to seeking to the end of the file and will facilitate an append operation. Fix example.
1 parent aa8f68a commit f4b9c8c

File tree

1 file changed

+2
-2
lines changed
  • content/hardware/03.nano/carriers/nano-connector-carrier/tutorials/getting-started-nano-connector-carrier

1 file changed

+2
-2
lines changed

content/hardware/03.nano/carriers/nano-connector-carrier/tutorials/getting-started-nano-connector-carrier/content.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ void loop() {
471471
unsigned long currentTime = millis();
472472
if (currentTime - lastRecordTime >= RECORD_INTERVAL) {
473473
// Open the file for writing
474-
dataFile = SD.open(fileName, FILE_APPEND);
474+
dataFile = SD.open(fileName, FILE_WRITE);
475475
476476
if (dataFile) {
477477
// Write timestamp and movement data to CSV file
@@ -649,4 +649,4 @@ For additional project inspiration, check out the Arduino Project Hub or join th
649649

650650
## Conclusion
651651

652-
The Nano Connector Carrier transforms your Nano family board into a versatile platform capable of interfacing with different sensors, displays and storage options. By eliminating complex wiring and providing standardized pinouts, the Nano Connector Carrier allows you to focus on developing your application rather than dealing with connection issues.
652+
The Nano Connector Carrier transforms your Nano family board into a versatile platform capable of interfacing with different sensors, displays and storage options. By eliminating complex wiring and providing standardized pinouts, the Nano Connector Carrier allows you to focus on developing your application rather than dealing with connection issues.

0 commit comments

Comments
 (0)