from myro import * init("/dev/rfcomm1") def moveToObstacle(): backward(0.75) #Check for an obstacle, all the time while( (getIR("left") == 1) and (getIR("right") == 1) and getStall() == 0 ): #while( not (0 in getIR()) ): print "no wall found!" stop() print "Stopped!" return def wander(seconds): while( timeRemaining(seconds) ) : moveToObstacle() turnLeft(1,0.5)