servo.set_pulse_width(steeringsrv, 955, 2000) servo.set_period(steeringsrv, 20000) servo.set_acceleration(steeringsrv, 7000) # Full acceleration 0xFFFF servo.set_velocity(steeringsrv, 0xFFFF) # Full speed servo.set_position(motor, stop) servo.set_position(steeringsrv, mid) servo.enable(motor) servo.enable(steeringsrv) # Set Period for coordinates callback to 1s (1000ms) # Note: The callback is only called every second if the # coordinates have changed since the last call! gps.set_coordinates_callback_period(500) gps.set_status_callback_period(50) # Register current callback to function cb_current gps.register_callback(gps.CALLBACK_COORDINATES, cb_coordinates) gps.register_callback(gps.CALLBACK_STATUS, cb_status) raw_input('Press key to exit\n') # Use input() in Python 3 ipcon.destroy()