1

My code fragment is

String item[] = {"Hello","How","Where"};
int slot[] = {2,0,0};
i=0;
String t = item[slot[i]];
lcd.write(t);       //This gives error

How to eradicate the problem. I am a beginner with ArduinoIDE and microprocessors. Thank You.

1 Answer 1

1

It think you should use lcd.print instead of lcd.write. The function lcd.write write out single characters at a time, since you want to output a string you can use lcd.print instead.

lcd.print(t);

Also refer write and print on manual. http://arduino.cc/en/Reference/LiquidCrystalWrite

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.