// THIS VERSION IS FOR SCILAB 6, With THE SERIAL COMMUNICATION TOOLBOX // INSTALLED VIA ATOMS exec HOTPLATEseeTMP.sce; exec HOTPLATEreset.sce; exec HOTPLATEshutFAN.sce; warning("off"); global HOTPLATEinfo HOTPLATEinfo.Max_Num_Port = 25; HOTPLATEinfo.COM_PORT = 3; HOTPLATEinfo.Data_Size = 9; Message = "3000000"; while HOTPLATEinfo.COM_PORT < HOTPLATEinfo.Max_Num_Port then try HOTPLATEinfo.Handle = openserial(HOTPLATEinfo.COM_PORT,"9600,n,8,1"); sleep(2000); mprintf('-- Available port COM'+msprintf('%i',HOTPLATEinfo.COM_PORT)+' detected\n'); mprintf('-- (Port COM'+msprintf('%i',HOTPLATEinfo.COM_PORT)+' detecté pour les nouilles en anglais)\n'); Error = 0; catch HOTPLATEinfo.COM_PORT = HOTPLATEinfo.COM_PORT + 1; Error = -1; end if Error == 0 then break end end if Error == -1 then mprintf('--ERROR-- \nNo available COM port detected\n'); mprintf('Unplug and Plug ARDUINO then try again\n'); else HOTPLATEreset(); for i=1:10 sleep(100) HOTPLATEseeTMP(); end disp("Initialization Terminated: Starting XCOS") xcos end