Arduino Forum

Using Arduino => Storage => Topic started by: KIOT0 on May 11, 2019, 12:40 am

Title: Navigate between files in a sd
Post by: KIOT0 on May 11, 2019, 12:40 am
Hi, I mention my problem:

I have some txt files in an sd, I want (for now) that the user to be able to type an entire variable (1,2,3,4) in the serial monitor and depending on which variable it is, open and show the file in question (in the serial monitor too), I appreciate if you can help me, I'm a bit new in the management of sd.
Title: Re: Navigate between files in a sd
Post by: Lucario448 on May 11, 2019, 06:41 pm
First of all: Serial.parseInt() (https://www.arduino.cc/reference/en/language/functions/communication/serial/parseint/)

Then you'll have to somehow map those numbers to their corresponding file names, either by a lookup table or by a pattern in the naming (e.g. "FILE0001.txt").