Serial read loop not reading \n
i new arduino , c. have writeen sketch check, whether year leap year. in order allow user input have added function read serial monitor, so: code: [select] int readline(char str[]) { char c; int index = 0; while (true) { if (serial.available() > 0) { c = serial.read(); serial.print("received char: "); serial.println(c, hex); if (c != '\n') { serial.print("debug (readline | if > char): "); serial.println(c); str[index++] = c; } else { serial.print("debug (readline | if > else): "); serial.println(c); str[index] = '\0'; // null...