I have written a simple code to read data from capacitive keypad and display it on LCD.

I am getting the data from keypad in following data structure.

char phoneNumber[PHONE_DIGITS];

and then displaying the data on LCD as


where my LCD string function is

void LcdString(char *characters)
  while (*characters)

There is a type cast error

error: invalid conversion from 'char' to 'char*' [-fpermissive]

How can I debug it?

1 Answer 1


You're calling your function with a single char, specified by phoneNumber[i], but your function is expecting an array.

If you change your call to:


then that will pass the entire array.

Are you trying to say that you're storing multiple phone numbers? i.e. a two dimensional array? Check out the String reference for more details: https://www.arduino.cc/en/Reference/String

Your Answer

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