Hello, I'm a beginner to the arduino and the coding. I want to build this robot posted here at http://arduino.cc/forum/index.php/topic,90809.0.html but I want to know how to set the outputs he listed to the output pins for my motor shield. The motor shield I will be receiving is Recommendations For You - DealeXtreme . Can anyone please help me. I'm a total noob when it comes to this. Please reply!
Have you worked through any of the examples provided with the IDE?
Not really, I just started working on some projects that seemed simple to me. I just want to know how the output pins are set in the sketch provided. I understand everything else to it.
It's just this part.
int i;
for(i=5;i<=8;i++) //For Arduino Motor Shield
pinMode(i, OUTPUT); //set pin 4,5,6,7 to output mode
How do I change the output pins to something else like 13, 12, 11, 3.
The for() loop is an easy way to set the pins from 5,6,7 (not sure why the comment is wrong) to OUTPUT.
Hint, it would be the same as doing:
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
Ahh, so I just remove what I've listed above and use the separate regular pinMode thing? Makes a lot of sense now. Thank you very much!