this is my code and I have a problem with array.
int main(void)
{
PORTD = 0x01;
LCDOUT();
char count = 0;
char firstLine[] = "Number of count";
char secondLine[] = {count};
while (1)
{
Command(HOME);
LCD_String(firstLine);
Command(LINE2);
LCD_String(secondLine);
if ((PIND&0x01)==0x00)
{
count++;
_delay_ms(500);
}
}
}
I want to make
char secondLine[] = "0"; when the code starts.
And if ((PIND&0x01) == 0x00)), then
secondLine[] = "1"
secondLine[] = "2"
secondLine[] = "3"
...
...
So in the secondLine, the number of counts can be shown through LCD.