Escolar Documentos
Profissional Documentos
Cultura Documentos
Construccion de la Solución
Presentado Por:
Código:
1023919249
Grupo:
203036A_291
Presentado A:
Juan Monroy
Bogotá D.C
3 de Noviembre de 2016
function varargout = matrizLedGUIDE(varargin)
% MATRIZLEDGUIDE M-file for matrizLedGUIDE.fig
% MATRIZLEDGUIDE, by itself, creates a new MATRIZLEDGUIDE or raises
the existing
% singleton*.
%
% H = MATRIZLEDGUIDE returns the handle to a new MATRIZLEDGUIDE or
the handle to
% the existing singleton*.
%
% MATRIZLEDGUIDE('CALLBACK',hObject,eventData,handles,...) calls the
local
% function named CALLBACK in MATRIZLEDGUIDE.M with the given input
arguments.
%
% MATRIZLEDGUIDE('Property','Value',...) creates a new
MATRIZLEDGUIDE or raises the
% existing singleton*. Starting from the left, property value pairs
are
% applied to the GUI before matrizLedGUIDE_OpeningFcn gets
called. An
% unrecognized property name or invalid value makes property
application
% stop. All inputs are passed to matrizLedGUIDE_OpeningFcn via
varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only
one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before matrizLedGUIDE is made visible.
function matrizLedGUIDE_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to matrizLedGUIDE (see VARARGIN)
x=imread('logo1.jpg');
imshow(x)
% image(x),colormap(map),axis off,hold on
% --- Outputs from this function are returned to the command line.
function varargout = matrizLedGUIDE_OutputFcn(hObject, eventdata,
handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global A
A=zeros(5,5);
% Get default command line output from handles structure
varargout{1} = handles.output;
A(1,1)=get(hObject,'value');
A(1,2)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb21
% --- Executes on button press in rb31.
function rb31_Callback(hObject, eventdata, handles)
% hObject handle to rb31 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global A
A(1,3)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb31
A(1,4)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb41
A(1,5)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb51
A(2,1)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb12
A(2,2)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb22
A(2,3)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb32
A(2,4)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb42
A(2,5)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb52
A(3,1)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb13
A(3,2)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb23
A(3,3)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb33
A(3,4)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb43
A(3,5)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb53
A(4,1)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb14
A(4,2)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb24
A(4,4)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb44
A(4,5)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb54
A(5,1)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb15
A(5,2)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb25
A(5,3)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb35
% --- Executes on button press in rb45.
function rb45_Callback(hObject, eventdata, handles)
% hObject handle to rb45 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global A
A(5,4)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb45
A(5,5)=get(hObject,'value');
% Hint: get(hObject,'Value') returns toggle state of rb55
for i=2:1:13
IO.pinMode(i,'OUTPUT')
end
for i=2:1:6
IO.digitalWrite(i,1)
end
for i=7:1:13
IO.digitalWrite(i,0)
end
global A
A
while true
for j=1:1:5
if A(j,1)==1
IO.digitalWrite(2,0)
end
if A(j,2)==1
IO.digitalWrite(3,0)
end
if A(j,3)==1
IO.digitalWrite(4,0)
end
if A(j,4)==1
IO.digitalWrite(5,0)
end
if A(j,5)==1
IO.digitalWrite(6,0)
end
IO.digitalWrite(14-j,1)
pause(0.00001)
IO.digitalWrite(14-j,0)
if A(j,1)==1
IO.digitalWrite(2,1)
end
if A(j,2)==1
IO.digitalWrite(3,1)
end
if A(j,3)==1
IO.digitalWrite(4,1)
end
if A(j,4)==1
IO.digitalWrite(5,1)
end
if A(j,5)==1
IO.digitalWrite(6,1)
end
end
end