close all
clear all


t = tcpip('192.168.1.5',666);
fopen(t);

if(strcmp(get(t,'status'),'closed'))
   error('tcp/ip connection not opened succesfully, quiting');
end


while (get(t, 'BytesAvailable') > 0)  %Read all available junk
    A = fread(t,get(t, 'BytesAvailable'));
end

 get_cmd = 'zippy';%'GetCurrProfile';
 fprintf(t, get_cmd);
 while (get(t, 'BytesAvailable') == 0)  %Wait for response
 end
 A = fscanf(t);
 
 A  %Parse A here





figure
plot(VV,II,'-x');
xlabel('Voltage');
ylabel('Current (Amps)');


fclose(t);
