mbed client example for mbed connect asia 2016

Dependencies:   simple-mbed-client

Fork of simple-mbed-client-example by sandbox

Files at this revision

API Documentation at this revision

Comitter:
mbed_demo
Date:
Mon Dec 05 04:05:10 2016 +0000
Parent:
35:4b11d20d60e9
Commit message:
mbed client example for mbed connect asia 2016

Changed in this revision

mbed_app.json Show annotated file Show diff for this revision Revisions of this file
security.h Show annotated file Show diff for this revision Revisions of this file
simple-mbed-client.lib Show annotated file Show diff for this revision Revisions of this file
source/main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 4b11d20d60e9 -r 5971ce0b1ea4 mbed_app.json
--- a/mbed_app.json	Fri Dec 02 15:46:04 2016 +0800
+++ b/mbed_app.json	Mon Dec 05 04:05:10 2016 +0000
@@ -69,7 +69,9 @@
             "esp8266-rx": "D2"
         },
         "NUMAKER_PFM_NUC472": {
-            "button": "SW1"
+            "button": "SW1",
+            "builtin_led_on": 0,
+            "builtin_led_off": 1
         }
     }
 }
diff -r 4b11d20d60e9 -r 5971ce0b1ea4 security.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/security.h	Mon Dec 05 04:05:10 2016 +0000
@@ -0,0 +1,1 @@
+#error "Please get your security.h file from www.connector.mbed.com#security"
\ No newline at end of file
diff -r 4b11d20d60e9 -r 5971ce0b1ea4 simple-mbed-client.lib
--- a/simple-mbed-client.lib	Fri Dec 02 15:46:04 2016 +0800
+++ b/simple-mbed-client.lib	Mon Dec 05 04:05:10 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/sandbox/code/simple-mbed-client/#a98cabe88e0f
+https://developer.mbed.org/users/mbed_demo/code/simple-mbed-client/#3fd6afc63e6a
diff -r 4b11d20d60e9 -r 5971ce0b1ea4 source/main.cpp
--- a/source/main.cpp	Fri Dec 02 15:46:04 2016 +0800
+++ b/source/main.cpp	Mon Dec 05 04:05:10 2016 +0000
@@ -20,8 +20,8 @@
 }
 
 // Define resources here. They act as normal variables, but are exposed to the internet...
-SimpleResourceInt btn_count = client.define_resource("button/0/clicks", 0, M2MBase::GET_ALLOWED);
-SimpleResourceString pattern = client.define_resource("led/0/pattern", "500:500:500:500:500:500:500", &patternUpdated);
+SimpleResourceInt btn_count = client.define_resource("3200/0/5501", 0, M2MBase::GET_ALLOWED);
+SimpleResourceString pattern = client.define_resource("3201/0/5853", "500:500:500:500:500:500:500", &patternUpdated);
 
 void fall() {
     btn_count = btn_count + 1;
@@ -69,7 +69,7 @@
     eventQueue.call_every(25000, callback(&client, &SimpleMbedClient::keep_alive));
 
     // Functions can be executed through mbed Device Connector via POST calls
-    client.define_function("led/0/play", &play);
+    client.define_function("3201/0/5850", &play);
 
     // Connect to the internet (see mbed_app.json for the connectivity method)
     NetworkInterface* network = easy_connect(true);