I'm trying to get a hold of the first char in a string array and write it to an LCD screen. I'm having an awful time and I'm pretty sure I bumbling up the pointers somewhere along the way. I know the correct string is stored in the array because I can print the whole string using a different function.
Prototype to write a char to the LCD:
void lcd_putc(char c);
Initialization of the variable:
Saving a string to the buffer (typical string would be "125"):
I want to be able to display just the first char of this string. Here's how I'm trying to do it:
I keep getting this warning... the screen shows jibberish when I run this:
warning: cast from pointer to integer of different size
So I think I'm actually trying to display the address of the buffer rather than the value. But I'm stuck at this point because I thought I was appropriately dereferencing the pointer.
Can anyone shed light on this problem for me? Thanks!!