Skip to content

Instantly share code, notes, and snippets.

@jimmyli97
Last active August 29, 2015 14:11
Show Gist options
  • Save jimmyli97/4e818c4a0fc06b934118 to your computer and use it in GitHub Desktop.
Save jimmyli97/4e818c4a0fc06b934118 to your computer and use it in GitHub Desktop.
//RobotC variable that keeps track of # of total motors
int kNumbOfTotalMotors = 5;
int maxMotorPowers[kNumbOfTotalMotors];
maxMotorPowers[(int) leftMotor] = 100; //(int) leftMotor translates to 1, a valid array index
maxMotorPowers[(int) rightMotor] = 50;
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment