function [out] = set_slide_temp(temperature)

%correct for error:
if(temperature > 25)
temperature_orig = temperature;
temperature = (temperature * 0.667) + 6.25;

disp(['                                                  |->Correcting setpoint; ' num2str(temperature_orig) 'C specified, setting to ' num2str(temperature)]); 
end


if(temperature <= get_slide_temp)
disp(['                                                  |->Current slide temp is ' num2str(get_slide_temp) 'C, <= ' num2str(temperature) '.  Setting to ' num2str(temperature)]); 
    bioptechs(temperature);
elseif(temperature < (get_slide_temp + 0.7))
disp(['                                                  |->Current slide temp is ' num2str(get_slide_temp) 'C, within 0.8 of ' num2str(temperature) '.  Setting to ' num2str(temperature)]); 
    bioptechs(temperature);
else
disp(['                                                  |->Setting to ' num2str(temperature) 'C.']);
    bioptechs(temperature);
end
if(temperature > 25)
    pause(150);%REMOVE THIS AND UNCOMMENT NEXT 2 LINES WHEN ANALOG IN IS FIXED
    %while(get_slide_temp + 0.7 < temperature)
     %   pause(2)
    %end
end


out = 1;