Hi All,
I have the following command line to switch ON/OFF a system.
body = struct('switch','on');
response = webwrite(url,body, opts);
Also I have following code to get sensor data from system via database
rawdata = get_data(start date,end date,sensorlist,api,[],[],[],[]);
Now I am trying to write a TimerFcn code where "response" code will be execute based on system temperature and ambient temperature data.
Example:
if system temperature => ambient temperature then send "response" command to OFF the system
if system temperature < ambient temperautre then send "response" command to ON the system
I am here upto, but dont know how to put "response" and "rawdata" lines together with logic mentioned above for @TimerFcn.....also in here i am geeting data based on start and end date, not sure how I can read data over time from database to check the logic.
'ExecutionMode', 'fixedRate', ...
'TimerFcn', {@TimerFcn},...
disp('Starting timer...');
Any help will be highly appreciated. Thanks