% THIS IS THE CONTROL.M FUNCTION

function [Motor1Out, Motor2Out] = Controller(Motor1Pulses, Motor2Pulses)
%CONTROLLER Summary of this function goes here
%   Detailed explanation goes here


SETPOINT = 8400; 
CURRENT = Motor1Pulses;

ERROR = SETPOINT - CURRENT;

k = 0.5;

Motor1Out = ERROR/8400*k;

Motor2Out=0;
end

