if (servo0pos > 180) //Let's servo position values stay in scope.
{
servo0pos = 180;
}
if (servo1pos > 180)
{
servo1pos = 180;
}
if (servo0pos < 0)
{
servo0pos = 0;
}
if (servo1pos < 0)
{
servo1pos = 0;
}
It would probably be a good idea to constrain the values BEFORE writing them to the servos.
It would definitely be a good idea to use Tools + Auto Format to fix the indenting in your code.
It would definitely be a good idea to explain what the problem is. If the issue is that you need to hit the enter key after each letter, you need a different telnet client - one that automatically sends each letter as a packet, which might be hard to find, as most of the time, you do NOT want to send one letter per packet.