Servo twitching & ultrasonic sensor interference during motor operation - fix?

The servo twitched rapidly and the ultrasonic sensor produced inaccurate readings while the motors were running, how to solve this problem?
2024-07-11 08:53:02 You can add a 0.1uF capacitor between each motor's positive and negative pole.
Tonny12138
