Go to Post we would all build robots to play "rock-paper-scissors" if FIRST told us to, cause it is just so freakin' much fun to build a robot until 2:30am every night for six weeks! - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2005, 13:19
Slick Slick is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Martinsville, VA
Posts: 21
Slick is an unknown quantity at this point
Help with Selector Switch

I'm having a problem with receiving input from a switch to tell the robot which Autonomous Code to run. I have set a variable in the program and currently I have a switch is plugged into pwm01. I was hoping to use this switch to relay a signal to the robot, set the variable, and run the code the variable selects. Is all of this done in the "user_routines_fast.c" file or do I need to modify other files? Any examples of Coding will be a great help....
  #2   Spotlight this post!  
Unread 16-02-2005, 14:08
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,112
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: Help with Selector Switch

Quote:
Originally Posted by Slick
I'm having a problem with receiving input from a switch to tell the robot which Autonomous Code to run. I have set a variable in the program and currently I have a switch is plugged into pwm01
The pwm pins are outputs. You need to plug your switch in to one of the digital inputs, and read the value of that input. See the RC documentation for details on which pins to connect to and how to access it in software.
  #3   Spotlight this post!  
Unread 16-02-2005, 16:09
Slick Slick is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Martinsville, VA
Posts: 21
Slick is an unknown quantity at this point
Re: Help with Selector Switch

Thanks... This is my first year. Is all the programming done in the "user_routines_fast.c" file?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi