Display Different colors based on data received via bluetooth from sound sensor

I think what you are trying to do, which is to receive data depending on their length, will not work, or will be very unreliable. In your .ino code, prepare all the data and send one long packet of fixed-length data. Divide the data, for example, with the "|" character. After receiving, divide the data by creating a list.

Thank you for your help, I solved it as a result of my own efforts. I was able to get data regularly and replace the indicator bar.

Thanks for letting us know you got it working.