Is it possible and okay to use 1 digital I/O pin to control "1,2 EN" and "3,4 EN" at the same time by having the pin wired to both of them in parallel?
I'm noticing while I am testing my project that my stepper motors are consuming huge amounts of energy and aren't leaving enough for my dc motor when I need my dc motors to work.
Basically I want my stepper motors to move to certain positions. Once those are in position, then they just stay there and then the dc motors comes into play and starts doing some timed movement. Once that is done, the stepper motors move again while the dc motors are inactive.
To put it simpler, I want it like a seesaw: 2 stepper motors on, 2 dc motors off then visa versa and never on at the same time and I think that the best way to do that would be through the 1,2 EN and 3,4 EN on the motor drivers but I wanted to read your guys' input about controlling two EN's with one I/O pin. My objective is to conserve pins and power. (I don't think I can control motors using analog pins and I don't think I can turn off stepper motors using stepper library?) Thanks
Well curiosity got the best of me. Seems to work okay. Now I am having another dilemma. How do I get the pushbutton to work on the joystick controller?
Does it work just like other pushbuttons? Do I need a resistor to ground for this one? I am assuming it's open circuit initially which the digitalRead is "LOW". So far I have not got mine to work. It's the same controller I've been working with on my project mentioned in the other thread, http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1289580263.
I don't think I can control motors using analog pins
Analog pins can be used as digital outputs (or inputs). You can refer to them as A0, A1, A2...
Does it work just like other pushbuttons? Do I need a resistor to ground for this one? I am assuming it's open circuit initially which the digitalRead is "LOW"
"Open circuits" do not read LOW. They read whatever noise is present. Sometimes that's a LOW, sometimes that's a HIGH.
So yes, just like all pushbuttons, you should have a pull-up or pull-down resistor.
Thanks, yeah. I was trying to figure out how to work this pushbutton built-in with the joystick controller I figured out that it always reads HIGH until the user pushes which then it will read LOW so that was something new for me. Typically the pushbuttons I worked with are initially always on LOW until pressed then HIGH.
I had another question (instead of building another thread I just posted this question here): How do I add an external source to the Arduino UNO other than the USB to power the Arduino UNO? I've tried 12V AC 830mA into the 2.1mm center-positive plug and a 5.0V 2.5A into the plug as well but both don't seem to make it operate. I unloaded my code beforehand, then unplugged my micro controller from the computer after the code was uploaded but did not seem to work. The hardwiring was fine when I tested it before and after I tried it with an external power source. The website says 7 - 12 volts so I'm not sure what else could be the problem. Can someone help me out? Some of the microcontroller lights light up when I do plug in those two power sources but again the code is not working.
I've tried plugging it into the USB from my computer while the code was previously loaded onto the microcontroller and it worked without having to re upload the code (due to the memory on the controller).
Edit: Does it matter if the power supply is AC or DC?
Well I found another power source that can plug into the power jack pin and the rating says "DC 13.8V 8W"
Now the recommended voltage supply says 7-12V but what happens when it's outside of the recommended but within the limits? I don't want my microcontroller to get fried....