
Communicate With Arduino Over BLE
This is an experimental example, that shows how to communicate with an Arduino board equipped with the Bluetooth Low Energy (BLE) shield.

Source Code
You can browse the source code for this example at the Evothings GitHub repository
The file app/index.html is the entry point of the app.
The file arduinoble/arduinoble.ino contains the Arduino BLE server that communicates with the app.
What You Need
This example requires an iOS device or an Android device with support for Bluetooth 4.0 (which includes BLE). In addition Android 4.3 or later is required.
You need to run the example in the Evothings client app. Alternatively, you can make a Cordova application if you wish to distribute the app. You then need to include the Cordova plugin com.evothings.ble. See page Evothings App for further details.
Please note that BLE support on Android is still not fully mature. As a result, you may experience difficulties running this example. Known problems related to Evothings Studio include interactively reloading the app from the Workbench. If the app stops working, restart the Evothings client app.
You need and Arduino board with a BLE shield.
For the Arduino setup, you need:
- LED
- Resistor 2200 Ohm
- Potentiometer
- BLE shield
- Install BLE libraries in the Arduino IDE library folder. Go to the page Getting Started with BLE Shield and follow the instructions regarding libraries setup.
Sketch
This is a sketch of a board configured to work with this example. Please observe that a Bluetooth LE shield, like the RedBearLab BLE Shield is required and would sit on top of the Arduino in the illustration, but is currently missing from this sketch. However, the pins pass straight through, while this sketch is meant to show you the wiring for the example.

The ON & OFF buttons controls digital pin 2 on the Arduino, here connected to a LED (long leg is the anode - connect to plus - and short one the cathode to be attached to minus if relevant or ground (GND pin). The plot also demonstrates reading an input signal from analog pin A0 - which is here connected to a variable resistor (potentiometer). Please experiment with your own circuits and let us know how cool they are!
Copyright © 2013-2014 Evothings AB