This application is a reimplementation of an example application that RedBearLab provides (iOS example app - Source code, Android example app - Source code). The application shows you how to communicate in both directions with your RedBearLab board (read/write). The example hardware setup contains LEDs and a potentiometer connected to the development board. See the above example apps for hardware setup.
You can browse the source code for this example at the Evothings GitHub repository
The file index.html contains the HTML markup of the app and the app.js contains the logic.
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 one of RedBearLab development boards that has an implementation of the Simple Control example available, for example Blend or Blend Micro. You can also use an Arduino with a BLE Shield.
You also need the following hardware components in order to build the external circuit.
Fritzing sketch of the external cricuit:
Photo of the hardware setup:
Follow these steps to get started with this example: