lcd and servo not working together

i am making a grid following and object detection robot where the objects are of different heights and the robot has to place those objects in particular coordinates according to their heights…i have used to 2 servos for my gripper arms and i use an lcd among other components(hc-sr04,tcrt sensor array,motors)…when i upload a code to test my grippers ALONE then they work perfectly and also when i upload a code segment excluding the servos the robot works good too…but when i use the servos along with the same program code then- firstly,the servos initially twitch randomly and after a few seconds work as expected…secondly,the lcd is either flickering or printing garbage value…ave attached the code…sorry its too long :disappointed_relieved:
do skip the sensor and motorcontrol functions…

phase1.ino (17.1 KB)

How are you powering it all?


m using a 9volt battery to run the motors....and for the rest-data cable from my laptop....

I have a similar problem but my servos are connected to my motor shield and I'm powering it with a 7.2v battery for all the boards (Arduino,LCD shield&Motor shield).

Could anyone shed any light on this topic?