no matching function for call to ‘LiquidCrystal::write(String&)’

  arduino, arduino-c++, arduino-uno, c++
void printOnLcd(String s){
  for (int i =0; i<2; i++){ 
    if( i % 2 == 0){ 
         for(int a=0; a<16; a++){ 
             lcd.setCursor(a,i);
             lcd.write(s);
             delay(200); 
             lcd.setCursor(a,i);
             lcd.write(" ");
         }
    } else {
       for(int a = 0; a<16; a++){
           lcd.setCursor(a,i);
           lcd.write(s);
           delay(200);
           lcd.setCursor(a,i);
           lcd.write(" ");
       }
    }
}

Arduino gives me the problem: no matching function for call to ‘LiquidCrystal::write(String&)’
Can’t I put a string on the screen? what’s the problem? I encountered this problem a few days ago and now I don’t have a chance to look for a possible solution.

Source: Windows Questions C++

LEAVE A COMMENT