This example shows you how to use Web Bluetooth to communicate with an mbed program to toggles a LED on the Nordic Semiconductor nRF51 DK using a mobile application. Note that this app should work with any mbed compatible BLE hardware.
The mbed source code for this example is found at the mbed.org web site. There you will also find a tutorial for the mbed program.
The source code for the mobile application is provided with the Evothings Studio download. You can browse the HTML/JS code online at the Evothings GitHub repository.
The file index.html contains the HTML markup and the file app.js contains the application logic. Note that the code is written in ECMAScript 6.
This example runs in Evothings Viewer on Android or iOS.
An iOS device or an Android device with support for Bluetooth 4.0 (which includes BLE) is required. For Android, version 4.3 or later is needed.
You need the Nordic Semiconductor nRF51 DK or a another mbed compatible device (we have tested this example with the nRF51).
Source code and information about the mbed program is available at the mbed.org web site.
Summary of how to build and install the mbed program:
Also check out the mbed quick start video on YouTube.
Related information is available in this tutorial for Nordic Semiconductor nRF51 DK.
Follow these steps to run the mobile app for this example:
The tutorial Evothings Studio 2.1 alpha with support for Web Bluetooth and ECMAScript 6 provides further details about Web Bluetooth.
Read more about ECMAScript 6 on the ECMAScript 6 documentation page.