Hi, I have this task of fetching a .txt file from an SD card and send that .txt file using NRF module. Right now, I am only planning of a .txt file of size few Kb (10kb is enough). So, that should be easy. Isn't it ?
What I figured out so far :
I have looked at the SdFat library and found that it has functions to list out the files, open a file and print out the contents in that file. And I hope that's enough.(Right ?)
I also looked at the RF24 library. It also has few easy to use functions such as
radio.write(msg,strlen(msg)) to send a string of 32bytes at once that is stored in a char variable msg.
And in order to do that I will have to send the returned data by SD functions to radio.write() as a char array.
What I don't have idea on is :
Because, the SD card reader and the NRF module works on SPI protocol (Sharing MOSI, MISO and SCK pins). Do I have to store the fetched data (file name and its content) in EEPROM or something before I disable the CS pin of SD card and enable the CS pin of NRF ? Is there any other way I can do it without storing ? I don't know if I have to use some kind of buffer !!