Hello all.
My first time here : ) I've been fiddling with Arduino for a few weeks now, as a non-electronics expert and non-programmer I'd first like to say how amazed and grateful I am at all the online resources (this forum included) that are freely available for helping and supporting Arduino users with their projects. I've already managed to get much further with the electronics and coding stages of my project than I really thought was possible and that's thanks to this supportive community.
Now on to my first question here...
I have successfully got the Arduino to control one of my 6 wire 12 volt Unipolar stepper motors. I'm not using any purchased motor shields, just the simplest breadboard circuit I could find using an ULN 2004 IC (no other components) . The IC is controlled from 4 Arduino digital outputs.
I'm currently using the standard Stepper library that ships with Arduino.
I've got the circuit from Tom Igoe's page, and am running the basic Stepper examples (from Arduino's menus) to test everything...
http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors/
This all works fine : )
I would now like to control two identical stepper motors, having independent control over each.
So I added another ULN2004 IC to my breadboard, connected up another 4 Arduino outputs and modified the basic code to set up a second Stepper object with another name.
I had imagined I could just add a second motor this way, but somehow the code for the second motor breaks the system so that neither motor works.
If I comment out the new bits of code, I get control of the first motor again, but never two at once.
I'll post my code example later here to follow this up (when I'm home again), but just wondering first if this is the correct approach or is there a better way to implement control over 2 steppers than this...
Many thanks
Chris