Nick_Pyner:
Probably right there. Nobody else uses a hardware serial library, so why would you?
Thanks for answering! i am not using that library in anyway, i originally thought it was a library for using the first pins as serial, i was wrong , as i didn't clearly understand how they work, but i now do.
Nick_Pyner:
You keep talking about the phone disconnecting, but you might speculate that it is the Arduino that is doing the disconnecting - because of a shortage of power.
The app is almost certainly not your problem.
|I do not know which side is disconnecting,
pert:
How are you powering your servo?
I am using a DC power supply to power both the Bluetooth module (HC-05 zs040) and the Servo(SG90) giving exactly 5 Volts , and limiting amps at 1(I am far away from reaching that anyway).
I think its also worth mentioning that i used a voltage devider as people suggested, using a 4k resistor and a 2k one, but im guessing because my problem only happens when i try to use a servo that it is an arduino problem.
Thanks for answering!