The below list is a glossary of the Arduino commands used in coding, their functions, and the variables used within.
Variables Used:
- m – designate motor, (1-3, 4 indicates all motors)
- p1 – percentage power at beginning
- p2 – percentage power at end
- t – time (seconds)
- p – percentage power
- n – number of marks (1 mark = 0.4875 inches)
Commands:
- celerate(m,p1,p2,t);
- Accelerates or decelerates motor(m) from p1 to p2 in t seconds
- motorSpeed(m,p);
- Initializes motor(m) at power(p)
- goFor(t);
- Runs motors at current state for t seconds
- brake(m);
- Cuts power to motor(m)
- reverse(m);
- Reverses polarity of motor(m)
- goToRelativePosition(n);
- Continues previous command for (n) marks from current position
- Can be positive or negative
- goToAbsolutePosition(n);
- Continues previous command for (n) marks relative to overall starting position