This is a simple mbed client example demonstrating, registration of a device with mbed Device Connector and reading and writing values as well as deregistering on different Network Interfaces including Ethernet, WiFi, 6LoWPAN ND and Thread respectively.
Fork of mbed-os-example-client by
Diff: main.cpp
- Revision:
- 68:6c535975a6e3
- Parent:
- 65:ea64e559b7d3
--- a/main.cpp Tue Feb 28 12:45:10 2017 +0000 +++ b/main.cpp Thu Mar 09 18:46:25 2017 +0000 @@ -345,6 +345,8 @@ // Keep track of the main thread mainThread = osThreadGetId(); + printf("\nVersion 5\n"); + printf("\nStarting mbed Client example in "); #if defined (MESH) || (MBED_CONF_LWIP_IPV6_ENABLED==true) printf("IPv6 mode\n"); @@ -401,10 +403,15 @@ mbed_client.test_register(register_object, object_list); registered = true; + printf("Start loop\n"); + while (true) { - updates.wait(25000); + updates.wait(5000); + printf("loop\n"); + printf("registered: %i\n", registered); if(registered) { if(!clicked) { + printf("Calling test_update_register()\n"); mbed_client.test_update_register(); } }else { @@ -412,10 +419,12 @@ } if(clicked) { clicked = false; + printf("Calling handle_button_click()\n"); button_resource.handle_button_click(); } } + printf("Calling test_unregister()\n"); mbed_client.test_unregister(); status_ticker.detach(); }