fixed substring reading errors

tested with hand inputted values, works as expected, now prints "!" with
a println to allow for python code to use serial.readline() instead of
read() so that it will only return when a new line is sent