Obtener informacion del canal
--> channelID = 1768821
channelID =
1768821.
--> userapi = '64N9AFZHHP6I782A'
userapi =
"64N9AFZHHP6I782A"
--> channel_info= thingspeak_channelinfo(channelID,userapi)
channel_info =
id = 1768821
name = "Temperatura LM35 By Ivan Diaz"
description = ""
latitude = "0.0"
longitude = "0.0"
created_at = "2022-06-14T23:56:30Z"
elevation = ""
last_entry_id = 16
public_flag = %f
url = ""
ranking = 30
metadata = ""
license_id = 0
github_url = "null"
tags = []
api_keys: [1x2 struct] with fields:
["api_key", "write_flag"]
a
--> apiWriteKey = 'XTOK8904FTI6TKT5'
apiWriteKey =
"XTOK8904FTI6TKT5"
-
--> new_entry = thingspeak_newentry("status","New update!","field1",25)
new_entry =
field1 = 25
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "New update!"
--> new_entry = thingspeak_newentry("status","New update!","field1",25)
new_entry =
field1 = 25
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "New update!"
--> disp(new_entry)
field1 = 25
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "New update!"
--> writeapi='DKQQEEGHSOW901EU'
writeapi =
"DKQQEEGHSOW901EU"
--> writekey='DKQQEEGHSOW901EU'
writekey =
"DKQQEEGHSOW901EU"
--> new_entry = thingspeak_newentry("status","New update!","field1",20)
new_entry =
field1 = 20
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "New update!"
--> new_entry = thingspeak_newentry("field1",20)
new_entry =
field1 = 20
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = []
--> channel_info= thingspeak_channelinfo(channelID,userapi)
channel_info =
id = 1768821
name = "Temperatura LM35 By Ivan Diaz"
description = ""
latitude = "0.0"
longitude = "0.0"
created_at = "2022-06-14T23:56:30Z"
elevation = ""
last_entry_id = 16
public_flag = %f
url = ""
ranking = 30
metadata = ""
license_id = 0
github_url = "null"
tags = []
api_keys: [1x2 struct] with fields:
["api_key", "write_flag"]
Conectar con la nube
--> thingspeak='thingspeak'
thingspeak =
"thingspeak"
--> obj = iot_init('thingspeak');
obj =
cloud = "thingspeak"
url_base = "https://api.thingspeak.com"
url_post = "https://api.thingspeak.com/update.json?api_key=DKQQEEGHSOW901EU"
url_get: [1x1 string]
deviceid = "1797022"
post_acc = "DKQQEEGHSOW901EU"
read_acc = "563YS5OWC0O2LOEK"
auth = ""
token = ""
variableid = ""
cacert = ""
--> cloud = "thingspeak"
cloud =
"thingspeak"
--> entryID=thingspeak_update(apiWriteKey,new_entry)
entryID =
17.
--> new_entry = thingspeak_newentry("status","New update!","field1",59)
new_entry =
field1 = 59
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "New update!"
--> new_entry = thingspeak_newentry("field1",57)
new_entry =
field1 = 57
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = []
--> entryID=thingspeak_update(apiWriteKey,new_entry)
entryID =
18.
--> new_entry = thingspeak_newentry("field1",18)
new_entry =
field1 = 18
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = []
--> entryID=thingspeak_update(apiWriteKey,new_entry)
entryID =
19.
--> entryID=thingspeak_update(apiWriteKey,new_entry)
entryID =
20.
--> new_entry = thingspeak_newentry("field1",18,"field1",'hola')
new_entry =
field1 = "hola"
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = []
--> new_entry = thingspeak_newentry("field1",18,"field2",'hola')
new_entry =
field1 = 18
field2 = "hola"
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = []
--> entryID=thingspeak_update(apiWriteKey,new_entry)
entryID =
21.
--> new_entry = thingspeak_newentry("field1",-13,"field2",'hola')
new_entry =
field1 = -13
field2 = "hola"
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = []
--> entryID=thingspeak_update(apiWriteKey,new_entry)
entryID =
22.
--> new_entry = thingspeak_newentry("status","ola que hace","field1",25)
new_entry =
field1 = 25
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "ola que hace"
--> new_entry = thingspeak_newentry("status","New update!","field1",25)
new_entry =
field1 = 25
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "New update!"
--> new_entry = thingspeak_newentry("status","New update!","field1",25)
new_entry =
field1 = 25
field2 = []
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = "New update!"
--> new_entry = thingspeak_newentry("latitude","25!","field2",25)
new_entry =
field1 = []
field2 = 25
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = "25!"
longitude = []
elevation = []
status = []
--> new_entry = thingspeak_newentry("latitude","25","field2",25)
new_entry =
field1 = []
field2 = 25
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = "25"
longitude = []
elevation = []
status = []
--> new_entry = thingspeak_newentry("latitude",25,"field2",25)
new_entry =
field1 = []
field2 = 25
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = 25
longitude = []
elevation = []
status = []
--> new_entry = thingspeak_newentry("field2",25)
new_entry =
field1 = []
field2 = 25
field3 = []
field4 = []
field5 = []
field6 = []
field7 = []
field8 = []
latitude = []
longitude = []
elevation = []
status = []
--> entryID=thingspeak_update(apiWriteKey,new_entry)
entryID =
23.
//Write your callback for Suma here
a=get(handles.pantalla,'string');
a=a+"+";
set(handles.pantalla,'string',a);
endfunction
function resta_callback(handles)
//Write your callback for resta here
a=get(handles.pantalla,'string');
a=a+"-";
set(handles.pantalla,'string',a);
endfunction
function Multiplicacion_callback(handles)
//Write your callback for Multiplicacion here
a=get(handles.pantalla,'string');
a=a+"*";
set(handles.pantalla,'string',a);
endfunction
function division_callback(handles)
//Write your callback for division here
a=get(handles.pantalla,'string');
a=a+"/";
set(handles.pantalla,'string',a);
endfunction
function igual_callback(handles)
//Write your callback for igual here
a=get(handles.pantalla,'string');
disp(a)
a2=evstr(a);
a3=string(a2);
disp(a3)
set(handles.pantalla,'string',a3);
calcula=a3;
v=get(handles.clientes,'string');
v=v+"+1";
set(handles.clientes,'string',v);
v2=evstr(v);
v3=string(v2);
set(handles.clientes,'string',v3)
new_entry = thingspeak_newentry("field1",a3,"field2",T.values(127),"field3",D.values(127),"field4",v3)
entryID=thingspeak_update("PNQ1CQUM0VUWBI8J",new_entry)
--> obj=favor_createData('PC1@ohin1uh', 'Sensor 2', ' Sensor2');
--> obj.data
ans =
Sensor 2 = "0"
Sensor2 = "0"
-->
--> obj.data.Sensor1= "1"
obj =
device_developer_id = "PC1@ohin1uh"
data: struct with fields:
Sensor 2 = "0"
Sensor2 = "0"
Sensor1 = "1"
--> obj.data.Sensor2= "1"
obj =
device_developer_id = "PC1@ohin1uh"
data: struct with fields:
Sensor 2 = "0"
Sensor2 = "0"
Sensor1 = "1"
Sensor2 = "1"
--> out = iot_sen(obj,key,value)
Undefined variable: key
--> key='XTOK8904FTI6TKT5'
key =
"XTOK8904FTI6TKT5"
--> out = iot_sen(obj,key,value)
Undefined variable: value
--> value ='15'
value =
"15"
--> out = iot_sen(obj,key,value)
Undefined variable: iot_sen
--> out = iot_send(obj,key,value)
at line 25 of function iot_send
Unknown field : cloud.
No hay comentarios.:
Publicar un comentario