Arduino Function Glossary:
- brake(m);
- Brakes motor (m)– does not brake the AEV
- Ex: brake(1); cuts power to motor 1
- celerate(m,s1,s2,t);
- Accelerate/Decelerate the motor (m) from start speed % (s1) to end speed % (s2) for a certain amount of time (t)
- Ex: celerate(1,30,65,3); accelerates motor 1 from 30% power to 65% power in 3 seconds
- goFor(t);
- Runs the motor at their initial state for an amount of time t
- Ex: goFor(7); runs the motor (specified before) at its initial state for 7 seconds
- goToAbsolutePosition(n);
- Carries on the previous command for marks (n) relative to the original starting point of the AEV
- Ex: motorSpeed(1,27); goToAbsolutePosition(220); Motor 1 is set to 27% power and it will continue to run at that power until the AEV reaches 220 marks from its original/starting position
- goToRelativePosition(n);
- Carries on the previous command for marks (n) from the AEV’s current position. “n” can be positive (vehicle moving forward) or negative (vehicle moving backward)
- Ex: motorSpeed(1,27); goToRelativePosition(20); Motor 1 is set to 27% power and will continue to run at that power until the AEV reaches 20 marks from its current position
- motorSpeed(m,p);
- Initializes motor (m) at % power (p)
- Ex: motorSpeed(1,27); sets motor 1’s speed to 27% power
- reflectanceSensorTest();
- Verifies that the sensors are on correctly
- Make sure baud rate is set to 115200 and the proper port is selected in order to talk to the arduino
- reverse(m);
- Reverses the polarity of the motor (m)
- Ex: reverse(2); reverses the polarity of motor 2