You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2019. It is now read-only.
Modify the main.cpp to understand the new "abstract" buttons in mbed OS.
Prevoius buttons were applicable only to K64F, but since mbed OS has
BUTTON1 and BUTTON2, you can check for those in a board independent manner.
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -378,17 +378,17 @@ handle_button_click, new value of counter is 1
378
378
1. Flash the application.
379
379
2. Verify that the registration succeeded. You should see `Registered object successfully!` printed to the serial port.
380
380
3. On mbed Device Connector, go to [My devices > Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here.
381
-
4. Press the **SW2** button on the device a number of times (make a note of how many times you did that).
381
+
4. Press the **BUTTON1** button on the device a number of times (make a note of how many times you did that).
382
382
5. Go to [Device Connector > API Console](https://connector.mbed.com/#console).
383
383
6. Click the **Endpoint directory lookups** drop down menu.
384
384

385
385
7. In the menu, click **GET** next to **Endpoint's resource representation**. Select your _endpoint_ and _resource-path_. For example, the _endpoint_ is the identifier of your endpoint that can be found in the `security.h` file as `MBED_ENDPOINT_NAME`. Select `3200/0/5501`as a resource path and click **TEST API**.
386
-
8. The number of times you pressed **SW2** is shown.
387
-
9. Press the **SW3** button to unregister from mbed Device Connector. You should see `Unregistered Object Successfully` printed to the serial port and the LED starts blinking. This will also stop your application. Press the **Reset** button to run the program again.
386
+
8. The number of times you pressed **BUTTON1** is shown.
387
+
9. Press the **BUTTON2** button to unregister from mbed Device Connector. You should see `Unregistered Object Successfully` printed to the serial port and the LED starts blinking. This will also stop your application. Press the **Reset** button to run the program again.
388
388
389
-
<span class="notes">**Note:** On non-K64F boards, there is no unregistration functionality and button presses are simulated through timer ticks incrementing every 15 seconds.</span>
389
+
<span class="notes">**Note:** On boards without BUTTON2 there is no unregistration functionality. Boards without buttons the button presses are simulated through timer ticks incrementing every 15 seconds. Please note the actual printout on the board for the BUTTON1 and BUTTON2 changes a lot - you need map that out from the mbed OS board files.</span>
390
390
391
-

391
+

392
392
393
393
<span class="tips">**Tip:** If you get an error, for example `Server Response: 410 (Gone)`, clear your browser's cache, log out, and log back in.</span>
394
394
@@ -398,14 +398,18 @@ handle_button_click, new value of counter is 1
398
398
399
399
The application exposes three [resources](https://docs.mbed.com/docs/mbed-device-connector-web-interfaces/en/latest/#the-mbed-device-connector-data-model):
400
400
401
-
1. `3200/0/5501`. Number of presses of **SW2** (GET).
401
+
1. `3200/0/5501`. Number of presses of **BUTTON1** (GET).
402
402
2. `3201/0/5850`. Blink function, blinks **LED1** when executed (POST).
403
403
3. `3201/0/5853`. Blink pattern, used by the blink function to determine how to blink. In the format of `1000:500:1000:500:1000:500` (PUT).
404
404
405
405
To learn how to get notifications when resource 1 changes, or how to use resources 2 and 3, read the [mbed Device Connector Quick Start](https://github.com/ARMmbed/mbed-connector-api-node-quickstart).
406
406
407
407
## Known issues
408
408
409
+
### mbed OS 5.5
410
+
411
+
* [UBLOX_EVK_ODIN_W2]: BUTTON1 and BUTTON2 definitions are missing from board file.
412
+
409
413
### mbed OS 5.4
410
414
411
415
* [UBLOX_EVK_ODIN_W2]: This example is not compiling with IAR. See [#194](https://github.com/ARMmbed/mbed-os-example-client/issues/194)
0 commit comments