I'm building a robot with a Pixy cam and an Arduino Uno. If you're not familiar with it, the Pixy tracks color. I am starting basic and just having it track along the x-axis, turning its head left and right to keep an object centered in its line of sight. It worked fine attached to a DC motor, but I thought a stepper would give me better accuracy, and that's where my problems have started.
The stepper motor works, and the circuit is set up properly. I know this because everything ran fine using the example code found in IDE. Once I connected my Pixy to the Uno and ran code extremely similar to the DC code, the stepper started trying to move, but just ended up as a vibrating box. I believe the problem probably lies in the code. Has anyone had similar issues?
Here's the code.
pixystepper.ino (1.51 KB)