ROBOTC.net forums
http://robotc.net/forums/

Precision Mode
http://robotc.net/forums/viewtopic.php?f=21&t=2760
Page 1 of 1

Author:  magicode [ Wed Nov 17, 2010 8:47 pm ]
Post subject:  Precision Mode

My team has used this technique with great results, and I thought that I would share it with everyone. We all want our robot to be as fast and possible, but precision is also key. We solved this problem by having our robot move at half speed while a certain button is pressed. Here's the code.

Code:
task main(){
  int precision = 1;
  while true(){
    precision = vexRT[Btn6U] ? 2 : 1;
    //Sets precision equal to 2 if button 6U is pressed, and 1 if it's not

    motor[leftWheel] = vexRT[Ch2] / precision;
    motor[rightWheel] = vexRT[Ch2] / precision;
  }
}

Author:  mightor [ Thu Nov 18, 2010 1:03 am ]
Post subject:  Re: Precision Mode

Nice tip! I've moved it to the "Tips for Beginnners" for the IFI platform :)

- Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/