I'm using this hc-05 Bluetooth module to communicate between my laptop and an Arduino mega 2560. I'm using Processing to send the data from my computer.
The Bluetooth module stops receiving data every 2 seconds and blinks and then starts receiving data again. Everything else works fine, but I don't know why this is happening. Here is the Arduino code, and the Processing code. Here is a video I recorded of the the led and hc-05 module. Here's a video of the serial monitor receiving the data from the Bluetooth module that received the data from the my laptop. The data is being sent correctly, but the hc-05 module isn't receiving it correctly. I tried switching out the hc-05 with another one and issue persisted. Can somebody tell me why this is happening and what I can do to fix it?