View Single Post
  #5   Spotlight this post!  
Unread 07-02-2013, 20:34
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Connecting an FRC Dashboard project to an FRC cRio project

I suggest just making a straightforward slider control that ranges from 0 to 15. Since it's going to control a delay time, I don't see any reason to limit it to specific predefined values.

"Connecting" a Dashboard control to a cRIO program is just a matter of letting the SmartDashboard communication do its job. If you make a Dashboard control and don't connect it to anything, it will be picked up as a SmartDashboard value and automatically shared with the cRIO.

Reading the value is just a matter of...reading the value. Use the SD Read Number function and tell it the name of the Dashboard control you created. Then multiply the value you get by 1000 and feed it to a Wait (ms) function.

There are several ways to keep the rest of the Autonomous code from running until the Wait has finished. I'll let you decide how you want to do it.