Read sd card content(text files) and display it on lcdi2c i am working for a project based on lifi using arduino and i need to diplay content of sd card to lcd i tried a lot some online programs also i tried but there is a simple blank screen. one of the code i used is this:
CODE:
#include &lt;SD.h&gt;
#include &lt;SPI.h&gt;

#include &lt;LiquidCrystal_I2C.h&gt;
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7);

File myFile;
const int CSpin = 10;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(CSpin, OUTPUT);
  SD.begin(CSpin);

  lcd.begin(20,4);
  lcd.setBacklightPin(3, POSITIVE);
  lcd.setBacklight(HIGH);
}

void loop() {
  // put your main code here, to run repeatedly:
  lcd.setCursor(0,0);
  ReadLine();
  myFile.close();
}

void ReadLine(){
  myFile = SD.open(&quot;Sample.txt&quot;, FILE_READ);
  myFile.seek(0);
  char cr;
  for(unsigned int i = 0; i &lt; (3 - 1);){
    cr = myFile.read();
    if(cr == '\n')
      {
        i++;
      }
  }

  while(true){
    cr = myFile.read();
    Serial.write(cr);
   
    if(cr == '\n'){
      break;
    }
    //here...
    else if(cr &gt;= 0x20 &amp;&amp; cr &lt;= 0x7E){
      lcd.print(cr);
    }
   
  }
}

displays blank screen
Please help me out!! Any other working program also would work.!! Thanks in advance.
Well The Do You Really Have an i2c module connected to the display you can find this out by checking how many pins the display has if it is not four pins then you need the LiquidCrystal Library If Not Then The Arguments Passed To The LiquidCrystal I2c Function Should Be The Address Witch Should Be 0x27 If You Did Not Modify The i2c Module(Next Time Give The Circuit Schmatics )