Previous way of transferring data from Arduino to computer with Bluetooth turned out to be not effective and, in fact, worked only once. I couldn’t figure out why I wasn’t able to connect Arduino and laptop via HC-05 ever again. I started to research about the history of Bluetooth and its various types over years and resulted to Bluetooth connection based on Central and Peripheral (Master and slave in older terminology) devices.

I kept experimenting with module HC-05, but as I learnt, it is not ideal for every application. It is an older technology based on Bluetooth 2.0, which was introduced on market in 2005, consumes more energy and generally is slower than Bluetooth 4.0 aka BLE (Bluetooth Low Energy) introduced on market in 2010. HM-10 is BLE module which I experimented with until I discovered Arduino Nano 33 BLE which has, as the name suggests, Bluetooth Low Energy built in the microcontroller itself. Arduino Nano BLE also has built in sensor LSM9DS1, which has accelerometer, gyroscope and magnetometer similarly like BNO055.
I experimented with LSM9DS1 as well but I realised that for my purpose I will need to use BNO055. Why I decided so? BNO055 is able to produce Euler angles absolute orientation data based only on one syntax within the code. I didn’t find anything like that at LSM9DS1. I found out that it is possible to program LSM9DS1 with an algorithm based on specific equations in order to obtain Euler angles values, but implementing them into the functional C++ code goes currently beyond my beginner’s abilities. However it is definitely something which I will have look into in near future, because getting Euler angles values from an in-built sensor means overall optimisation by getting rid off potentially redundant external sensor.
For now, I stuck to the BNO055. I have found codes for Peripheral and Central devices for Arduino Nano 33 BLE on Github and modified them to get Euler angles values from BNO055.
CODE FOR PERIPHERAL DEVICE:



CODE FOR CENTRAL DEVICE:



The result of these codes is getting x, y, z data from BNO055 connected to the Peripheral Arduino device and sending them via BLE into Central Arduino device, which is connected to the computer and prints pure x, y, z numerical values of Euler angles in serial monitor.
Getting numerical values into serial monitor in the specific format and speed will allow me to work with them further in Max For Live. I have created a Max device which is mappable to anything in Ableton Live but with a specific focus that this device in particular will control Surround Panner connected to the octaphonic ring.
