function varargout = newlm35(varargin)

gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @newlm35_OpeningFcn, ...
                   'gui_OutputFcn',  @newlm35_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end

function newlm35_OpeningFcn(hObject, eventdata, handles, varargin)

handles.output = hObject;

guidata(hObject, handles);

function varargout = newlm35_OutputFcn(hObject, eventdata, handles)

varargout{1} = handles.output;
clear all;
global aruno;
aruno = arduino();

function pushbutton1_Callback(hObject, eventdata, handles)

x = 0;
global aruno;
for i =  1:100
    v = readVoltage(aruno,'A0');
    tempC = v*100;
    display(tempC);
    x = [ x tempC];
    plot(handles.axes1,x)
    grid;
    set(handles.edit1,'String',num2str(tempC));
    pause(1);
end


function edit1_Callback(hObject, eventdata, handles)

function edit1_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end