user14872: I'd like to preface this by saying I'm a complete beginner, but I have learned a ton already on this project, and I feel like I'm almost there.
I'm using an Arduino Uno and an Adafruit motor shield. I am working on a project for mechanical engineering and I need lots of amps for lots of torque for my mechanism. I'm including my code although I know it doesn't work, I haven't had the chance to debug it yet, and I'm really not sure if I'm on the right track. 
So I know that it's possible to draw more amperage than is strictly allowed from the Arduino. What I don't know for sure is how to code it. Attached is my preliminary attempt.. I kind of assumed that the maximum speed would be the maximum allowable speed of the motor, regardless of the Arduino's capabilities, and scaled the output MAXampDrawSpeed as a function of that. To be specific, my motor can draw up to 20 amps, which would be too much for the Arduino to handle, so I scaled it down accordingly, with 255 being that maximum 20 amp output. I'm not sure if I'm on the right track there.
So the other problem is - the TA for my class made a simplified code reference file, sort of predefining a lot of the things that I manually defined in my code (or tried to at least). I didn't realize this, and when I asked him a question, he sort of shot me down and said "you should use my reference code" -- but his code doesn't compile for me. I had some problems with libraries (I fixed them!), but this isn't a library. It's a reference file, like the tabs up at the top. But it won't even compile for me. My feeling is that I may have annoyed him with my many many stupid questions up until this point and he's just kind of like "girl, get it together"... So the question there is -- am I almost there with my track or should I figure out what's wrong with his code and try to fix it his way so that I can ask him questions without being such a bother to him? And also is that likely to be a hindrance on drawing the extra amperage that I really really want? I am prepared to use heat dissipation methods as are necessary, and any advice you could give me there would also be appreciated. 
If you need any more information, about my mechanism or anything I'd be glad to share that as well. I'm parallel mounting one motor to the four dc motor mounts on my Arduino in order to draw maximum current in that way as well. I have two switches controlling the output, one of the switches will engage the program for the maximum distance competition and the other for the accuracy competition. 
So again, this code isn't right. I haven't even started on debugging it, because I didn't want to waste my time. Maybe you'll be able to follow my logic. I know there aren't many notes. If you need me to add notes for clarity I would also be glad to take the time to do that.
Thanks!
#include <Stepper.h>
#include <AccelStepper.h>
#include <Servo.h>
#include <Adafruit_MotorShield.h>
#include <Wire.h>
#include "Arduino.h"

#define STEP_TYPE_1   SINGLE
#define STEP_TYPE_2    SINGLE
#define STEPS_1    200
#define STEPS_2    200

Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_DCMotor *DC1 = AFMS.getMotor(1);
Adafruit_DCMotor *DC2 = AFMS.getMotor(2);
Adafruit_DCMotor *DC3 = AFMS.getMotor(3);
Adafruit_DCMotor *DC4 = AFMS.getMotor(4);
Servo Servo1;

void setup() {
  digitalWrite(A0, HIGH); //Turns on the pullup resistor for A0
  int i = analogRead(A0); //Reads the value on the analog pin and saves     this as variable "i"
  AFMS.begin(); //Initializes the motorshield board
  int motorPin1 = 1;
  int motorPin2 = 2;
  int motorPin3 = 3;

  pinMode(A0, INPUT); //Sets the Analog Pin 0 as an input
  digitalWrite(A0,HIGH);
  pinMode(A1, INPUT);
  digitalWrite(A1,HIGH);
  pinMode(A1, INPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  Servo1.attach(9);
}

void loop()  { 
  int distancepin = 0; //Just integer quantities, i like to have too     many of them 
  int accuracypin = 0;
  int inPin1 = 0; //switch pin values
  int inPin2 = 0; 
  int MAXampDrawTime = 75;
  int MAXampDrawSpeed = 178;
  int NORMampDrawTime = 225;
  int NORMampDrawSpeed = 61.2;
  int DrawTime = MAXampDrawTime+NORMampDrawTime;
  int ServoTime = 450;
  long previousMillis =0;
  long intervalMAXamps = 100;
  long intervalNORMamps = 400;
  DC1->setSpeed(MAXampDrawSpeed);
  DC2->setSpeed(MAXampDrawSpeed);
  DC3->setSpeed(MAXampDrawSpeed);
  DC4->setSpeed(MAXampDrawSpeed);
  inPin1 = digitalRead(A0);
  inPin2 = digitalRead(A1);
  if (inPin1 == HIGH){
    unsigned long time_zero = millis();
    unsigned long current_time = millis();
    digitalWrite(1,HIGH); //turn motor on to maximum draw amperage
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    while((millis()-time_zero)<(400000)){
      if( millis() >= (time_zero+NORMampDrawTime)){
      DC1->setSpeed(NORMampDrawSpeed); //set motor on to normal draw     amperage
      DC2->setSpeed(NORMampDrawSpeed);
      DC3->setSpeed(NORMampDrawSpeed);
      DC4->setSpeed(NORMampDrawSpeed);
      digitalWrite(1,HIGH); //turn motor on to normal draw amperage  
      digitalWrite(2,HIGH);
      digitalWrite(3,HIGH);
      digitalWrite(4,HIGH);
    }
    if ( millis() >= (time_zero+DrawTime)); {
      digitalWrite(1,0); //turn off motors
      digitalWrite(2,0);
      digitalWrite(3,0);
      digitalWrite(4,0);
    }
    if (millis() >= (time_zero+ServoTime));{
      Servo1.write(0);
      delay(400);
      Servo1.write(90);
    }
  }
}
if (inPin2 = HIGH);{
  int MAXampDrawTime = 75;
  int MAXampDrawSpeed = 59;
  int NORMampDrawTime = 225;
  int NORMampDrawSpeed = 20;
  int DrawTime = MAXampDrawTime+NORMampDrawTime;
  int ServoTime = 250;
  unsigned long previousMillis =0;
  unsigned long intervalHIamps = 100;
  unsigned long intervalNORMALamps = 400;
  DC1->setSpeed(MAXampDrawSpeed);
  DC2->setSpeed(MAXampDrawSpeed);
  DC3->setSpeed(MAXampDrawSpeed);
  DC4->setSpeed(MAXampDrawSpeed);

  unsigned long time_zero = millis();
  unsigned long current_time = millis();
  digitalWrite(1,HIGH);
  digitalWrite(2,HIGH);
  digitalWrite(3,HIGH);
  digitalWrite(4,HIGH);
  while((millis()-time_zero)<(500)){
  if( millis() >= (time_zero+MAXampDrawTime)){
    DC1->setSpeed(NORMampDrawSpeed);
    DC2->setSpeed(NORMampDrawSpeed);
    DC3->setSpeed(NORMampDrawSpeed);
    DC4->setSpeed(NORMampDrawSpeed);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
  } else( millis() >= (time_zero+DrawTime)); {
    digitalWrite(1,0);
    digitalWrite(2,0);
    digitalWrite(3,0);
    digitalWrite(4,0);
  }
  if (millis() >= (time_zero+ServoTime));{
    int  time_check = millis();
    while (millis() - time_check < 400000) {
      inPin1 = digitalRead(A0);
      if (inPin1 == HIGH ) {
        Servo1.write(0);
        delay(400);
        Servo1.write(90);
      }
    }
  }
}
}}


user10394: Firstly your formatting is horrible, but that's probably just the this editor, if it isn't please fix it.
In loop() you are wasting time if you are re declaring constants, move them outside the loop.
Why have you got 4 on switches?  Could you not gang them altogether? Join the wires and use just one pin?
you are repeating blocks of code, break these out into functions, this means less code to debug. I.e. SetMotorSpeed.
If (inPin2 = HIGH)

This will always be true, because an assignment is C\C++ always returns true, you meant ==
You TA is being paid to help you, don't be afraid to p##s them off, it's there job to get p'd off at students, and their choice.  At least you are doing it by asking questions not d##king around.  That said the most likely cause of you problems with his example is missing libraries or IDE version differences.  Or even library versions, if you add the first 5 errors as a comment I might be able to point you in the right direction.

14872: <p>I'd like to preface this by saying I'm a complete beginner, but I have learned a ton already on this project, and I feel like I'm almost there.</p>

<p>I'm using an Arduino Uno and an Adafruit motor shield. I am working on a project for mechanical engineering and I need lots of amps for lots of torque for my mechanism. I'm including my code although I know it doesn't work, I haven't had the chance to debug it yet, and I'm really not sure if I'm on the right track. </p>

<p>So I know that it's possible to draw more amperage than is strictly allowed from the Arduino. What I don't know for sure is how to code it. Attached is my preliminary attempt.. I kind of assumed that the maximum speed would be the maximum allowable speed of the motor, regardless of the Arduino's capabilities, and scaled the output <code>MAXampDrawSpeed</code> as a function of that. To be specific, my motor can draw up to 20 amps, which would be too much for the Arduino to handle, so I scaled it down accordingly, with 255 being that maximum 20 amp output. I'm not sure if I'm on the right track there.</p>

<p>So the other problem is - the TA for my class made a simplified code reference file, sort of predefining a lot of the things that I manually defined in my code (or tried to at least). I didn't realize this, and when I asked him a question, he sort of shot me down and said "you should use my reference code" -- but his code doesn't compile for me. I had some problems with libraries (I fixed them!), but this isn't a library. It's a reference file, like the tabs up at the top. But it won't even compile for me. My feeling is that I may have annoyed him with my many many stupid questions up until this point and he's just kind of like "girl, get it together"... So the question there is -- am I almost there with my track or should I figure out what's wrong with his code and try to fix it his way so that I can ask him questions without being such a bother to him? And also is that likely to be a hindrance on drawing the extra amperage that I really really want? I am prepared to use heat dissipation methods as are necessary, and any advice you could give me there would also be appreciated. </p>

<p>If you need any more information, about my mechanism or anything I'd be glad to share that as well. I'm parallel mounting one motor to the four dc motor mounts on my Arduino in order to draw maximum current in that way as well. I have two switches controlling the output, one of the switches will engage the program for the maximum distance competition and the other for the accuracy competition. </p>

<p>So again, this code isn't right. I haven't even started on debugging it, because I didn't want to waste my time. Maybe you'll be able to follow my logic. I know there aren't many notes. If you need me to add notes for clarity I would also be glad to take the time to do that.</p>

<p>Thanks!</p>

<pre><code>#include &lt;Stepper.h&gt;
#include &lt;AccelStepper.h&gt;
#include &lt;Servo.h&gt;
#include &lt;Adafruit_MotorShield.h&gt;
#include &lt;Wire.h&gt;
#include "Arduino.h"

#define STEP_TYPE_1   SINGLE
#define STEP_TYPE_2    SINGLE
#define STEPS_1    200
#define STEPS_2    200

Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_DCMotor *DC1 = AFMS.getMotor(1);
Adafruit_DCMotor *DC2 = AFMS.getMotor(2);
Adafruit_DCMotor *DC3 = AFMS.getMotor(3);
Adafruit_DCMotor *DC4 = AFMS.getMotor(4);
Servo Servo1;

void setup() {
  digitalWrite(A0, HIGH); //Turns on the pullup resistor for A0
  int i = analogRead(A0); //Reads the value on the analog pin and saves     this as variable "i"
  AFMS.begin(); //Initializes the motorshield board
  int motorPin1 = 1;
  int motorPin2 = 2;
  int motorPin3 = 3;

  pinMode(A0, INPUT); //Sets the Analog Pin 0 as an input
  digitalWrite(A0,HIGH);
  pinMode(A1, INPUT);
  digitalWrite(A1,HIGH);
  pinMode(A1, INPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  Servo1.attach(9);
}

void loop()  { 
  int distancepin = 0; //Just integer quantities, i like to have too     many of them 
  int accuracypin = 0;
  int inPin1 = 0; //switch pin values
  int inPin2 = 0; 
  int MAXampDrawTime = 75;
  int MAXampDrawSpeed = 178;
  int NORMampDrawTime = 225;
  int NORMampDrawSpeed = 61.2;
  int DrawTime = MAXampDrawTime+NORMampDrawTime;
  int ServoTime = 450;
  long previousMillis =0;
  long intervalMAXamps = 100;
  long intervalNORMamps = 400;
  DC1-&gt;setSpeed(MAXampDrawSpeed);
  DC2-&gt;setSpeed(MAXampDrawSpeed);
  DC3-&gt;setSpeed(MAXampDrawSpeed);
  DC4-&gt;setSpeed(MAXampDrawSpeed);
  inPin1 = digitalRead(A0);
  inPin2 = digitalRead(A1);
  if (inPin1 == HIGH){
    unsigned long time_zero = millis();
    unsigned long current_time = millis();
    digitalWrite(1,HIGH); //turn motor on to maximum draw amperage
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    while((millis()-time_zero)&lt;(400000)){
      if( millis() &gt;= (time_zero+NORMampDrawTime)){
      DC1-&gt;setSpeed(NORMampDrawSpeed); //set motor on to normal draw     amperage
      DC2-&gt;setSpeed(NORMampDrawSpeed);
      DC3-&gt;setSpeed(NORMampDrawSpeed);
      DC4-&gt;setSpeed(NORMampDrawSpeed);
      digitalWrite(1,HIGH); //turn motor on to normal draw amperage  
      digitalWrite(2,HIGH);
      digitalWrite(3,HIGH);
      digitalWrite(4,HIGH);
    }
    if ( millis() &gt;= (time_zero+DrawTime)); {
      digitalWrite(1,0); //turn off motors
      digitalWrite(2,0);
      digitalWrite(3,0);
      digitalWrite(4,0);
    }
    if (millis() &gt;= (time_zero+ServoTime));{
      Servo1.write(0);
      delay(400);
      Servo1.write(90);
    }
  }
}
if (inPin2 = HIGH);{
  int MAXampDrawTime = 75;
  int MAXampDrawSpeed = 59;
  int NORMampDrawTime = 225;
  int NORMampDrawSpeed = 20;
  int DrawTime = MAXampDrawTime+NORMampDrawTime;
  int ServoTime = 250;
  unsigned long previousMillis =0;
  unsigned long intervalHIamps = 100;
  unsigned long intervalNORMALamps = 400;
  DC1-&gt;setSpeed(MAXampDrawSpeed);
  DC2-&gt;setSpeed(MAXampDrawSpeed);
  DC3-&gt;setSpeed(MAXampDrawSpeed);
  DC4-&gt;setSpeed(MAXampDrawSpeed);

  unsigned long time_zero = millis();
  unsigned long current_time = millis();
  digitalWrite(1,HIGH);
  digitalWrite(2,HIGH);
  digitalWrite(3,HIGH);
  digitalWrite(4,HIGH);
  while((millis()-time_zero)&lt;(500)){
  if( millis() &gt;= (time_zero+MAXampDrawTime)){
    DC1-&gt;setSpeed(NORMampDrawSpeed);
    DC2-&gt;setSpeed(NORMampDrawSpeed);
    DC3-&gt;setSpeed(NORMampDrawSpeed);
    DC4-&gt;setSpeed(NORMampDrawSpeed);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
  } else( millis() &gt;= (time_zero+DrawTime)); {
    digitalWrite(1,0);
    digitalWrite(2,0);
    digitalWrite(3,0);
    digitalWrite(4,0);
  }
  if (millis() &gt;= (time_zero+ServoTime));{
    int  time_check = millis();
    while (millis() - time_check &lt; 400000) {
      inPin1 = digitalRead(A0);
      if (inPin1 == HIGH ) {
        Servo1.write(0);
        delay(400);
        Servo1.write(90);
      }
    }
  }
}
}}
</code></pre>
 10394: <p>Firstly your formatting is horrible, but that's probably just the this editor, if it isn't please fix it.</p>

<p>In loop() you are wasting time if you are re declaring constants, move them outside the loop.</p>

<p>Why have you got 4 on switches?  Could you not gang them altogether? Join the wires and use just one pin?</p>

<p>you are repeating blocks of code, break these out into functions, this means less code to debug. I.e. SetMotorSpeed.</p>

<pre><code>If (inPin2 = HIGH)
</code></pre>

<p>This will always be true, because an assignment is C\C++ always returns true, you meant ==</p>

<p>You TA is being paid to help you, don't be afraid to p##s them off, it's there job to get p'd off at students, and their choice.  At least you are doing it by asking questions not d##king around.  That said the most likely cause of you problems with his example is missing libraries or IDE version differences.  Or even library versions, if you add the first 5 errors as a comment I might be able to point you in the right direction.</p>
