Exemplo n.º 1
0
camera.vflip = True

#calibrate servos
c_left = Servo(pins.SERVO_LEFT_MOTOR)
c_right = Servo(pins.SERVO_RIGHT_MOTOR)
c_left.set_normalized(0.5)
c_right.set_normalized(0.5)

movement = Movement()
servo = Servo()

#initialize the Buzzer
buzzer = Buzzer()

#initialize the ultrasound
usound = Ultrasound()

#initialize the physical button press event
b = Button()


#Clean up on exiting so that the motors are off and the image is destroyed.
@atexit.register
def goodbye():
    print "You are killing the PyNet"
    #os.system("rm *.jpg")
    movement.stop()


def takePicture(name=0):
    buzzer.on()