Can someone help me solve this motor control issue

Thread Starter

John A Bonilla

Joined Mar 11, 2017
66
Hello Everyone,

I am currently working on a project that is using a PS/2 mouse to determine the position of the robot. However, there is an issue with the code for the arduino that ends up only moving one motor instead of both, but it performs the correct function by stopping at the coordinate its set at. I don't believe that it is a memory issue, but I am no expert by a long shot. I am using an Arduino Mega for anyone asking. The file titled "Code 1" is a new prototype code I worked on, and have yet to test. The second attachment titled "Code 2" which is the code that is giving be this trouble. I have played with the code and haven't gotten it to work. At one point both motors would spin when I moved the if statement with the md.setspeeds to the top, however I no longer got any data from the mouse itself. The third code titled, "Basic Example" is a code that makes the motors turn consistently without any interruptions or issues. If anyone has an idea of what I could change or what could be done to solve this issue it would be greatly appreciated!
 

Attachments

Top