Hello,
I am attempting to complete the Micromouse maze challenge, and I am running into some issues with controlling the motors. We are using stepper motors with two DRV8834 stepper motor drivers. We also are using the library files attached to control the mouse. When used solely in a sketch, the library files yield no issues with controlling backwards and forwards movement, indicating that the stepper motor libraries are fine. However, when we pass the object of the stepper motor driver into our own library, we encounter an issue with moving backwards. The motors will move forward fine, however when we pass a negative value to our library, the motors go very slow in the forward direction.
My sketch is attached (unfortunately too long to include without running out of characters)
My libraries are attached. I would greatly appreciate any help I can get - I have spent hours attempting to solve this issue with no fruition.
To summarize:
Hardware issues have been eliminated due to correct function with sketch directly calling libraries. Once I reference the library I have created, the motors stop functioning in the backwards direction.
I have experience in Java however no experience in C++ so please correct me on any syntax issues that I am having. My libraries are attached.
BasicStepperDriver.cpp (9.34 KB)
BasicStepperDriver.h (6.55 KB)
DRV8834.cpp (2.22 KB)
DRV8834.h (1.65 KB)
MMouse.cpp (9.47 KB)
MMouse.h (4.24 KB)
MultiDriver.cpp (3.43 KB)
MultiDriver.h (2.76 KB)
SyncDriver.cpp (1.7 KB)
SyncDriver.h (1.2 KB)
FinalMouseTest.ino (8.81 KB)