Please read the BLE code examples on the Arduino/Genuino 101 site ( ) and the comments in this code to further understand how to set up your BLE service and characteristics.Sending floats over BLE:All BLE data is transmitted as bytes. Once this is done, you can create your BLE service using the CurieBLE library:īLEService imuService("917649A0-D98E-11E5-9EEC-0002A5D5C51B") // Custom UUIDīLECharacteristic imuAccCharacteristic("917649A1-D98E-11E5-9EEC-0002A5D5C51B", BLERead | BLENotify, 12 ) īLECharacteristic imuGyroCharacteristic("917649A2-D98E-11E5-9EEC-0002A5D5C51B", BLERead | BLENotify, 12 ) īLEUnsignedCharCharacteristic appButtonCharacteristic("917649A7-D98E-11E5-9EEC-0002A5D5C51B", BLERead | BLEWrite ) The one I use was an online uuid generator: This is very easy to do and there are many resources to generate these uuids. Believe it or not, I was not able to find a standard service for inertial measurements! So for this application, I had to generate a custom uuid for my “imu service.” For custom services, you must create your own 128-bit custom uuid. For officially accepted services these uuids are specified for you. Every service and characteristic is specified by a universally unique identifier(uuid). In the world of BLE, these values are called characteristics. The BLE standard specifies services, which are collections or sets of related data values. A couple of good places to start learning are the CurieBLE library reference and the Adafruit BLE tutorial : The more you work with it, the more confident you will become in using BLE with your projects! There are many fine tutorials to help you get started. If you feel overwhelmed, don’t worry just start experimenting with it. I hoped it would be a simple as sending messages over the serial port. When I first starting working with BLE, I was overwhelmed by all the new terminology. I started with the accelerometer sketch and cut and pasted in the relevant gyroscope sketch elements into it afterwards. These are found at the bottom of the reference page for the CurieIMU library ( ). I used the accelerometer and gyroscope raw data access example sketches as the basis for my project’s sketch.
My first principle of writing software for arduino projects is to build upon the work of others, and this project is no different. If you have some basic programming knowledge and a willingness to read through and learn from some interesting code examples, then dive right in and utilize this remarkable tool!
The evothings website contains an abundance of outstanding tutorials and articles ( ) to help you get started. I did have experience in C/Arduino C and Python, but not in HTML/CSS/JavaScript. If you are concerned that not knowing HTML/CSS/JavaScript will hold you back, I can assure that prior to starting these projects and working with Evothings, I didn’t have any experience with web programming. The Evothings platform includes a library, appropriately named easyble.js, that has all the necessary functions to establish and communicate through a BLE connection to your Arduino/Genuino 101 project. With the EvothngsViewer app running on our mobile device, we can access the device’s native features, such as BLE. The Evothings platform is a complete "ecosystem." With EvothingsStudio we can write the mobile app component of our software using JavaScript/HTML/CSS.
In my initial efforts to work with BLE, I was confronted with the challenge of not only learning BLE but also having to learn about these options.