# Programming Basics

This page is to be used as a reference guide when reading code so that even if you have no programming knowledge you can still understand the code. The follow is a glossary of programming commands and their use. [1]

Function Syntax Function Effect Example
celerate(m,p1,p2,t); Accelerates the motor(s) m from percent p1 to percent p2 over t seconds. Can decelerate by going from a a p1 greater than p2. celerate(4,80,10,1);
Decelerates all motors from 80% to 10% in one second.
motorSpeed(m,p); Sets motor(s) m to p percent power. motorSpeed(1,30);
Sets motor 1 to 30% power.
goFor(t); Keeps motors running at their percents for t seconds. goFor(7);
Motors will continue running at their percents for 7 seconds.
brake(m); Stops m motor(s) from spinning. brake(2);
Cuts power to motor 2.
reverse(m); Changes direction of motor(s) m. reverse(4);
Reverses direction of all motors.
goToRelativePosition(n); Continues previous command till the AEV has moved n marks.
N can be negative for measuring backwards movement.
goToRelativePosition(10);
Continues previously set motor speeds till it’s moved 10 marks forwards.
goToAbsolutePosition(n); Continues the previous command for till the AEV has reached n marks away from the AEV’s initial starting position. goToAbsolutePosition(-5);
Continues previously set motor speeds till the AEV has arrived at 5 marks back from the initialized starting position.