Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: simple-mbed-client
Fork of simple-mbed-client-example by
Revision 36:5971ce0b1ea4, committed 2016-12-05
- 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
--- 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
}
}
}
--- /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
--- 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
--- 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);
