Sample application for the Bosch XDK device that shows raw numeric sensor data in real time. The data is gathered by the XDK device and transferred over Bluetooth Low Energy to the application running on the smartphone. The app displays the data in a simple numeric table.
The following three screenshots show how the app looks like initially, when it's connected, and when it's started showing sensor data.
You can browse the source code for this example at github.
The file index.html contains the HTML markup of the app and the app.js contains the logic.
This example runs in the Evothings Viewer on Android or iOS.
Yoyu need an iOS device or an Android device with support for Bluetooth 4.0 (which includes BLE). For Android version 4.3 or later is needed.
Obviously you need an XDK device from a retail distributor.
In order to be able to build and flash the device with the device side code, you also need to download and install the XDK Workbench 1.6.0 which is available for Windows 7 and later (not Linux or OSX).
Bosch has made available several guides on how to install and get started with the Eclipse based XDK Workbench. However, below you find the specific steps you need to just get the firmware built and flashed:
Use the Copy button on the Bosch Sensors example in the Examples tab in Evothings Studio, to get your own copy of the code.
Fire up the XDK IDE and connect the XDK device using a USB cord. Turn it on. Hopefully it will be discovered (I failed first due to a faulty cord) and then you will get the green icon and the "Flash" and "Boot" buttons appear, something like this:
Then you select "New Project" from the IDE, and then under "C/C++", pick "Makefile Project with Existing Code":
Find the xdk-firmware directory and import the code.
Now you should be able to build and flash your XDK device, either using the "Flash" button or by first building, producing a .bin file under the debug directory, and then flashing that file. Log should show something similar to this:
Success!