¿cuanta gente a visto el blog?

Proyecto Calculadora envia datos a la nube con Scilab

  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

Hacer Calculadora de Matrices en Scilab

 // This GUI file is generated by guibuilder version 4.2.1

//////////
dataA = grand(3,3,"uin",0,0)
dataB = grand(3,3,"uin",0,0)
dataC = grand(3,3,"uin",0,0)
f=figure('figure_position',[525,59],'figure_size',[656,582],'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.Sum=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.0984375,0.5979167,0.203125,0.1041667],'Relief','default','SliderStep',[0.01,0.1],'String','Suma','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Sum','Callback','Sum_callback(handles)')
handles.res=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.4015625,0.6041667,0.196875,0.0979167],'Relief','default','SliderStep',[0.01,0.1],'String','restar','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','res','Callback','res_callback(handles)')
handles.inv=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.096875,0.4,0.2015625,0.1],'Relief','default','SliderStep',[0.01,0.1],'String','Inversa','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','inv','Callback','inv_callback(handles)')
handles.mul=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.4015625,0.4041667,0.1953125,0.0958333],'Relief','default','SliderStep',[0.01,0.1],'String','Multiplicacion','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','mul','Callback','mul_callback(handles)')

f.visible = "on";

//////////
// Callbacks are defined as below. Please do not delete the comments as it will be used in coming version
//////////

function Sum_callback(handles)
//Write your callback for  Sum  here
//Write your callback for  Sum  here

//Write your callback for  Medio_Boton  here
    n = 3
    m = 3
    mat = rand(n, m);
    row = _("row");
    labelv = row(ones(1, n))+string(1:n); //debe ser String mismo
    col = _("col");
    labelh = col(ones(1, m))+string(1:m);
    res = evstr(x_mdialog(_("Matrix to edit"), labelv, labelh, string(mat)));

    if ~isempty(res) then
       dataA=res
        disp("Matriz A",dataA)
    end

//Write your callback for  dere_botton  here
    n = 3
    m = 3
    mat = rand(n, m);
    row = _("row");
    labelv = row(ones(1, n))+string(1:n); //debe ser String mismo
    col = _("col");
    labelh = col(ones(1, m))+string(1:m);
    res = evstr(x_mdialog(_("Matrix to edit"), labelv, labelh, string(mat)));

    if ~isempty(res) then
        dataB=res
        disp("segunda",dataB)
        dataC=dataA+dataB
        disp("resultado",dataC)

    end
endfunction

function res_callback(handles)
//Write your callback for  res  here
//Write your callback for  Sum  here

//Write your callback for  Medio_Boton  here
    n = 3
    m = 3
    mat = rand(n, m);
    row = _("row");
    labelv = row(ones(1, n))+string(1:n); //debe ser String mismo
    col = _("col");
    labelh = col(ones(1, m))+string(1:m);
    res = evstr(x_mdialog(_("Matrix to edit"), labelv, labelh, string(mat)));

    if ~isempty(res) then
       dataA=res
        disp("Matriz A",dataA)
    end

//Write your callback for  dere_botton  here
    n = 3
    m = 3
    mat = rand(n, m);
    row = _("row");
    labelv = row(ones(1, n))+string(1:n); //debe ser String mismo
    col = _("col");
    labelh = col(ones(1, m))+string(1:m);
    res = evstr(x_mdialog(_("Matrix to edit"), labelv, labelh, string(mat)));

    if ~isempty(res) then
        dataB=res
        disp("Matriz B",dataB)
        dataC=dataA-dataB
        disp("resultado",dataC)

    end
endfunction

function inv_callback(handles)
//Write your callback for  inv  here
    n = 3
    m = 3
    mat = rand(n, m);
    row = _("row");
    labelv = row(ones(1, n))+string(1:n); //debe ser String mismo
    col = _("col");
    labelh = col(ones(1, m))+string(1:m);
    res = evstr(x_mdialog(_("Matrix to edit"), labelv, labelh, string(mat)));

    if ~isempty(res) then
       dataA=res
        disp("Matriz A",dataA)
        dataC=inv(dataA)
        disp("Resultado",dataC)
    end
endfunction

function mul_callback(handles)
//Write your callback for  mul  here
    n = 3
    m = 3
    mat = rand(n, m);
    row = _("row");
    labelv = row(ones(1, n))+string(1:n); //debe ser String mismo
    col = _("col");
    labelh = col(ones(1, m))+string(1:m);
    res = evstr(x_mdialog(_("Matrix to edit"), labelv, labelh, string(mat)));

    if ~isempty(res) then
       dataA=res
        disp("Matriz A",dataA)
    end

//Write your callback for  dere_botton  here
    n = 3
    m = 3
    mat = rand(n, m);
    row = _("row");
    labelv = row(ones(1, n))+string(1:n); //debe ser String mismo
    col = _("col");
    labelh = col(ones(1, m))+string(1:m);
    res = evstr(x_mdialog(_("Matrix to edit"), labelv, labelh, string(mat)));

    if ~isempty(res) then
        dataB=res
        disp("Matriz B",dataB)
        dataC=dataA*dataB
        disp("resultado",dataC)

    end
endfunction 

Como programar Xcos para registrar distancia desde arduino

  Usa un arduino Nano alimentado con el voltaje del primer arduino como arduino exclavo cuya unica funcion en sensar la distancia y envie un voltaje analogico al arduino maestro