Autonomous:
from Dictionary.com
public void autonomousInit()
Called when autonomous period initiates. Called only once.
public void autonomousPeriodic()
Looped continuously during autonomous period. Since this is a loop, we should not have additional loops inside here. Doing so will cause unwanted delays.
public void autonomousInit() {
m_timer.reset();
m_timer.start();
}
When autonomous period is started, we would like a timer be started. (Equivalent to a stopwatch)
public void autonomousPeriodic() {
// Drive for 2 seconds
if (m_timer.get() < 2.0) { // get the time from the timer
m_robotDrive.arcadeDrive(0.5, 0.0); // drive forwards half speed
} else {
m_robotDrive.stopMotor(); // stop robot
}
}
Updated by Dexin on 3/20/2018