Example program for simple-mbed-client, connecting a device to mbed Device Connector.
Dependencies: simple-mbed-client
Fork of simple-mbed-client-example by
This is an example on how to connect to mbed Device Connector using simple-mbed-client. It can connect over Ethernet, WiFi (using an ESP8266 module or an ODIN board), Thread and 6LoWPAN.
After cloning this repository update `mbed_app.json` to reflect your connectivity method. For docs on configuring connectivity, see easy-connect.
End to end example
For an end-to-end example of using Simple mbed Client to connect devices to mbed Device Connector see Building an internet connected lighting system.
Entropy (or lack thereof)
On all platforms except the K64F and K22F the library is compiled without TLS entropy sources. This means that your code is inherently unsafe and should not be deployed to any production systems. To enable entropy, remove the MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES and MBEDTLS_TEST_NULL_ENTROPY macros from mbed_app.json.
Revision 28:f5e41738699d, committed 2016-08-25
- Comitter:
- Jan Jongboom
- Date:
- Thu Aug 25 14:39:39 2016 +0200
- Parent:
- 27:733d464dc189
- Child:
- 29:dd6231df71bb
- Commit message:
- Make SW2 the button again
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Aug 24 19:06:21 2016 +0200
+++ b/main.cpp Thu Aug 25 14:39:39 2016 +0200
@@ -8,7 +8,7 @@
DigitalOut led(LED1);
DigitalOut blinkLed(LED2);
-InterruptIn btn(PTA1);
+InterruptIn btn(SW2);
Semaphore updates(0);
void patternUpdated(string v) {
@@ -27,10 +27,10 @@
}
void registered() {
- printf("registered\n");
+ pc.printf("Registered\r\n");
}
void unregistered() {
- printf("unregistered\n");
+ pc.printf("Unregistered\r\n");
}
void play(void* args) {
