from tortoise import Tortoise
from enums import Direction, SensorType, ActuatorType

Name=Tortoise()

while True:

    touchSensor = Name.getSensorData(SensorType.touch,1)
    if touchSensor == 1:
        print "Switch is on"
        Name.moveForwards(30)
        Name.setLEDValue(1, 1) #self.setLEDValue(position, value)
    else:
        print "Switch is off"
        Name.setLEDValue(1, 0) #self.setLEDValue(position, value)

7e2d1010fd2ad75314b103c23ffb6a320cad2c54
from tortoise import Tortoise
from enums import Direction, SensorType, ActuatorType

Name=Tortoise()

while True:

    touchSensor = Name.getSensorData(SensorType.touch,1)
    if touchSensor == 1:
        print "Switch is on"
        Name.moveForwards(30)
        Name.setLEDValue(1, 1) #self.setLEDValue(position, value)
    else:
        print "Switch is off"
        Name.setLEDValue(1, 0) #self.setLEDValue(position, value)
