Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.