Closed wbadry closed 3 years ago
Hello, thank you for suggestions but I think that both are somewhat implemented already. cp.print() method has a "Stream" parameter of which default value is "Serial", so if anyone would like to provide different Serial object, it could be done like:
cp.print(Serial2);
Because it's declared like:
Regarding the configurable pins of SD card, if you take a look at the reading_from_SD_card example, the CSV-Parser library itself does not initialize the SD card, it has to be initialized/configured externally (by calling "SD.begin(chip_select_pin)"). CSV-Parser only calls "SD.open()" (inside the "cp.readSDfile()" method) and then operates on "File" object (calling File.available, File.read and File.close methods).
So as long as the SD library allows to configure pins, the CSV-Parser will not interfere with it.
From what I see, customisation of pins for ESP32 takes place within the "SD.begin" method, so I guess it should work fine.
Thank you so much, @michalmonday, for your prompt response. This is fantastic indeed.
Hello, The parser looks great and in a very structured coding.
My two requests, if possible:
Serial
,Serial1
orSerial2
withcp.print()
cp.readSDfile()
. This will be very handy when it comes to ESP32, which uses HSPI and VSPI that are native SPI than SPI, which is software in its case. The SD library allows using custom pins for SPI for this.Thank you so much.