View Single Post
  #2   Spotlight this post!  
Unread 28-01-2011, 07:54
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous Independent vi question

That is a demonstration of using inputs from the DS to influence the autonomous code. In this case, the two switches are used to choose between following the left edge of the Y, right edge of the Y, or following the straight line.

The switches come from the driver station. If you have a FIRST Touch module plugged into the DS, the laptop reads the value of the different buttons and pins, and that is what defines the values. If you do not have the module plugged in, you can still flip to the I/O tab, and enter the values on the screen.

In fact, if you are going to use the default code, I'd recommend editing the string near the first two buttons so that the driver, coach, or whoever else is setting up remembers how to set the switches.

Other useful DS input values are to set an analog slider or the joystick throttle to decide how long to wait, how far to drive, how fast to drive, how high to raise an arm, etc.

The demo code only drives the base. It is up to your team to decide if and how you'd like to use any of the other inputs and to write the code for it.

Greg McKaskle
Reply With Quote