I will explain the working of app via picture
1- I have a hardware which is connected to a Bluetooth module whose default password is 1234
2 - first my app connect to this module
3 - then receive R, G, B s values send by module
4 - then app compere this value with own R G B value (initial value 0,0,0)
5 - if received R,G and B value is less to own R,G,B then send updated R,G and B to module.