Updated robot.py

Experimental code. I placed everything in another while loop, so that if
there is a socket error, it's keeps listening on that port