Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Help with Selector Switch (http://www.chiefdelphi.com/forums/showthread.php?t=34754)

Slick 16-02-2005 13:19

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.... :) :)

Alan Anderson 16-02-2005 14:08

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.

Slick 16-02-2005 16:09

Re: Help with Selector Switch
 
Thanks... This is my first year. Is all the programming done in the "user_routines_fast.c" file?


All times are GMT -5. The time now is 00:01.

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