Looking for some advice here. I frequently get robots in my classes that drive for a second and then start to jitter (see the video). We swap out motors, change batteries, even change battery barrel jack connectors but still get the jitter. As you can see in the code, the program is very simple with no other code besides driving the motors for 5 seconds. Any guidance would be appreciated.
Try swapping the 9v battery to a new one or some other power source…any change?
You can also start with the blink sketch to ensure everything is running properly before moving on to the motors next https://learn.sparkfun.com/tutorials/ex … basic-test - I would also recommend trying the default motor test sketch that follows
Try running it on a 4AA battery pack. 9V batteries have very low current capacity, and starting motors have a high inrush current
/mike