Hey Everyone. I've got the following things: -Arduino mega 2560 -2x NEMA 11 stepper motor (200 steps / rot (1.8deg)) with an 500ppr incremental Encoder. Each motor is wired to L298p driver IC circuit. -L298p's are connected to arduino like: Left motor: A - arduino 3 A' - arduino 4 B - arduino 5 B' - arduino 6 Enable - arduino 7
A - arduino 8 A' - arduino 9 B - arduino 10 B' - arduino 11 Enable - arduino 12
Now I'm not using the encoders, cause they're acting weird. The problem is that the arduino can't read the encoder signals fast enough. I really hope someone can help me. Both encoders are connected to arduino's +5 and gnd. Left motors encoder is connected to arduino's 21(Enc A) and 20(Enc B) Right motors encoder is connected to arduino's 19(Enc A) and 18(Enc B).
I'd like to spin both motors at the same time, achieving the perfect positioning with the help of the encoders. I'm quiet new using arduino, and I read something about interrupts, but i don't know how to use them. Can someone help me achieve the following: Rotate both motors 800steps CW, then 800steps CCW. (At high speed if it's possible)