Commit eae54c44 authored by charlotte.kerr's avatar charlotte.kerr

MATLAB Analysis Code

parent 97d5ef8f
alert_body = 'Hello - your motion sensor has detected a motion in your space. (Note that there is a 30 minute cooldown before you will receive another email.) Please go visit the channel at the following link to view sensor activity: https://thingspeak.com/channels/2010296';
alert_subject = 'Motion Detected';
alert_api_key = 'TAKLj3MjUtW6R06myTS';
alert_url= "https://api.thingspeak.com/alerts/send";
jsonmessage = sprintf(['{"subject": "%s", "body": "%s"}'], alert_subject,alert_body);
options = weboptions("HeaderFields", {'Thingspeak-Alerts-API-Key', alert_api_key; 'Content-Type','application/json'});
result = webwrite(alert_url, jsonmessage, options);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment