clc
clear all
% volani dat=> HomeAutomation Bastl 2013
s = serial('COM4','BaudRate',9600);
fopen(s);

fprintf(s,'Z');
pause(1);

fprintf(s,'A1');

Data1 = fscanf(s);
display('Data z 1. jednotky:')
display(Data1(2:17));

fprintf(s,'A2');

Data2 = fscanf(s);
display('Data z 2. jednotky:')
display(Data2(2:17));

fprintf(s,'Z');

fclose(s);
delete(s);






