obj = iot_init('thingspeak');
// This GUI file is generated by guibuilder version 4.2.1 ////////// f=figure('figure_position',[400,50],'figure_size',[640,484],'auto_resize','on','background',[33],'figure_name','Graphic window number %d','dockable','off','infobar_visible','off','toolbar_visible','off','menubar_visible','off','default_axes','on','visible','off'); ////////// handles.dummy = 0; handles.uno=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.3,0.5,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','1','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','uno','Callback','uno_callback(handles)') handles.pantalla=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','left','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.1009615,0.8072562,0.7964744,0.0884354],'Relief','default','SliderStep',[0.01,0.1],'String','','Style','text','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','pantalla','Callback','') handles.dos=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.4,0.5,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','2','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','dos','Callback','dos_callback(handles)') handles.tres=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.5,0.5,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','3','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','tres','Callback','tres_callback(handles)') handles.cuatro=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.3,0.4,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','4','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','cuatro','Callback','cuatro_callback(handles)') handles.seis=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.5,0.4,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','6','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','seis','Callback','seis_callback(handles)') handles.siete=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.3,0.3,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','7','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','siete','Callback','siete_callback(handles)') handles.cinco=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.4,0.4,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','5','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','cinco','Callback','cinco_callback(handles)') handles.ocho=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.4,0.3,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','8','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','ocho','Callback','ocho_callback(handles)') handles.nueve=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.5,0.3,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','9','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','nueve','Callback','nueve_callback(handles)') handles.cero=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.4,0.2,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','0','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','cero','Callback','cero_callback(handles)') handles.punt=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.5,0.2,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','.','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','punt','Callback','punto_callback(handles)') handles.Suma=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.6,0.5,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','+','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Suma','Callback','Suma_callback(handles)') handles.resta=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.6,0.4,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','-','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','resta','Callback','resta_callback(handles)') handles.Multiplicacion=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.6,0.3,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','*','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Multiplicacion','Callback','Multiplicacion_callback(handles)') handles.division =uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.6,0.2,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','/','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','division ','Callback','division_callback(handles)') handles.igual=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.7,0.5,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','=','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','igual','Callback','igual_callback(handles)') handles.borrar=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.7,0.4,0.08,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','CE','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','borrar','Callback','borrar_callback(handles)') handles.xcod=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.19,0.2,0.19,0.08],'Relief','default','SliderStep',[0.01,0.1],'String','Modo de espera','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','xcod','Callback','sensores_callback(handles)') handles.clientes=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','left','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.9,0.1,0.11,0.1],'Relief','default','SliderStep',[0.01,0.1],'String','1','Style','text','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','nuclien','Callback','') f.visible = "on"; ////////// // Callbacks are defined as below. Please do not delete the comments as it will be used in coming version ////////// function sensores_callback(handles) //Write your callback for uno here xcos("Planosvariables.zcos"); endfunction function uno_callback(handles) //Write your callback for uno here a=get(handles.pantalla,'string'); a=a+"1"; set(handles.pantalla,'string',a); endfunction function dos_callback(handles) //Write your callback for dos here a=get(handles.pantalla,'string'); a=a+"2"; set(handles.pantalla,'string',a); endfunction function tres_callback(handles) //Write your callback for tres here a=get(handles.pantalla,'string'); a=a+"3"; set(handles.pantalla,'string',a); endfunction function cuatro_callback(handles) //Write your callback for cuatro here a=get(handles.pantalla,'string'); a=a+"4"; set(handles.pantalla,'string',a); endfunction function seis_callback(handles) //Write your callback for seis here a=get(handles.pantalla,'string'); a=a+"6"; set(handles.pantalla,'string',a); endfunction function siete_callback(handles) //Write your callback for siete here a=get(handles.pantalla,'string'); a=a+"7"; set(handles.pantalla,'string',a); endfunction function cinco_callback(handles) //Write your callback for cinco here a=get(handles.pantalla,'string'); a=a+"5"; set(handles.pantalla,'string',a); endfunction function ocho_callback(handles) //Write your callback for ocho here a=get(handles.pantalla,'string'); a=a+"8"; set(handles.pantalla,'string',a); endfunction function nueve_callback(handles) //Write your callback for nueve here a=get(handles.pantalla,'string'); a=a+"9"; set(handles.pantalla,'string',a); endfunction function cero_callback(handles) //Write your callback for cero here a=get(handles.pantalla,'string'); a=a+"0"; set(handles.pantalla,'string',a); endfunction function punto_callback(handles) //Write your callback for cero here a=get(handles.pantalla,'string'); a=a+"."; set(handles.pantalla,'string',a); endfunction function Suma_callback(handles) //Write your callback for Suma here a=get(handles.pantalla,'string'); a=a+"+"; set(handles.pantalla,'string',a); endfunction function resta_callback(handles) //Write your callback for resta here a=get(handles.pantalla,'string'); a=a+"-"; set(handles.pantalla,'string',a); endfunction function Multiplicacion_callback(handles) //Write your callback for Multiplicacion here a=get(handles.pantalla,'string'); a=a+"*"; set(handles.pantalla,'string',a); endfunction function division_callback(handles) //Write your callback for division here a=get(handles.pantalla,'string'); a=a+"/"; set(handles.pantalla,'string',a); endfunction function igual_callback(handles) //Write your callback for igual here a=get(handles.pantalla,'string'); disp(a) a2=evstr(a); a3=string(a2); disp(a3) set(handles.pantalla,'string',a3); calcula=a3; s v=get(handles.clientes,'string'); v=v+"+1"; set(handles.clientes,'string',v); v2=evstr(v); v3=string(v2); set(handles.clientes,'string',v3) new_entry = thingspeak_newentry("field1",a3,"field2",T.values(127),"field3",D.values(127),"field4",v3) entryID=thingspeak_update("PNQ1CQUM0VUWBI8J",new_entry) exec("video_cap.dem.sce") endfunction function borrar_callback(handles) //Write your callback for borrar here set(handles.pantalla,'string',""); endfunction function Fondo_callback(handles) //Write your callback for Fondo here endfunction
No hay comentarios.:
Publicar un comentario