This is a sample of the code I have used to control a robot using HC 06.
The Bluetooth app I am using is roboremo.
each button is assigned a LETTER ie A - I and a slider for speed control With ID "r".
The output range set to 0 to 255,
The HC 06 sends the slider data in 5 bytes - ID, space...