Best Arduino for a lot of digital outputs?
-
I'm looking to connect two stepper drivers to the Arduino, each one needs 2 digital pins for step/dir and 3 pins to control microstepping. I'd also like another pin to connect a light sensor to it. Is there a board that can support all these pins (~12) and the radio? Or would it be best to just get two Arduino pro minis and split it up?
-
@naveen
You can use the analog pins as digital io. It should get you to 12 on the pro mini:
http://waihung.net/arduino-tip-turn-your-analog-pins-into-digital-io/
-
That's a good tip, thanks!
I guess something like this could also work: http://www.arduino.cc/en/Tutorial/ShiftOut
-
Do you have any recommendation for this? I don't think the digital+analog inputs will be enough to connect two steppers and a luminosity sensor.
Do you foresee any issues using the shift register I linked previously?
-
AtMega 2560 perhaps?
-
Hmm, yeah that would work. It just seems like overkill for a few extra pins (price and size wise). I didn't realize there were 8 analog pins on the APM, those should actually be enough to drive all the things as long as they work OK as digital outputs.
I figure the shift register will cause problems because I won't be able to build an 'AccelStepper' object since the input for the constructor is a pin number. I assume I'd have to modify the code if I want to put it through the shift register.