Problem : daley command cuase bluetooth disconnected.

Hi,
I make Andriod app. to send input from mobile phone to Arduino nano 328, via HC-05 module. This set of hardware work well with all previous projects. But for my new project, blue tooth connection was terminated within 30 second. I’ve investigate for a week with various conditions. Finally i found that if i remove a “delay” command, the problem gone.

Since this project need to deal with time, i’ve tried “millis” instead of delay, but bluetooth connection still get disconnected in short period. How can i solve this? Any idea and suggestion are appreciated. Thank you.

My crystal ball has a vertical hold problem.