File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ long lasttime = millis();
45
45
void loop () {
46
46
coap.loop ();
47
47
if (millis ()-lasttime > 5000 ){
48
- lasttime = millis ();
49
- coap.iSYNC_GET (iSYNC_KEY);
48
+ lasttime = millis ();
49
+ coap.iSYNC_GET (iSYNC_KEY);
50
50
}
51
51
}
Original file line number Diff line number Diff line change @@ -45,10 +45,15 @@ long lasttime = millis();
45
45
void loop () {
46
46
coap.loop ();
47
47
if (millis ()-lasttime > 5000 ){
48
- lasttime = millis ();
49
- String Temperature=String (random (0 ,100 ));
50
- String Humidity=String (random (0 ,100 ));
51
- String payload=" {\" Temperature\" :" +Temperature+" ,\" Humidity\" :" +Humidity+" }" ;
52
- coap.iSYNC_POST (iSYNC_KEY,payload);
48
+ lasttime = millis ();
49
+ String Temperature=String (random (0 ,100 ));
50
+ String Humidity=String (random (0 ,100 ));
51
+ String payload=" {\" Temperature\" :" +Temperature+" ,\" Humidity\" :" +Humidity+" }" ;
52
+
53
+ Serial.println (" #iSYNC <- NBIoT" );
54
+ Serial.print (" #DATA : " );
55
+ Serial.println (payload);
56
+ coap.iSYNC_POST (iSYNC_KEY,payload);
57
+ Serial.println (" #----------------------------" );
53
58
}
54
59
}
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
29
#ifndef __SIMPLE_COAP_H__
30
30
#define __SIMPLE_COAP_H__
31
31
32
- #define SERVER_IP " 45.77.40.195"
32
+ #define SERVER_IP " coap.isync.pro"
33
+
33
34
#define SERVER_PORT 5683
34
35
35
36
#include " Udp.h"
You can’t perform that action at this time.
0 commit comments