Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Auton digital input (http://www.chiefdelphi.com/forums/showthread.php?t=34743)

ten3brousone 16-02-2005 03:06

Auton digital input
 
kind of confused by some of the things posted. they recommend switching diff auton codes by using if statements to check ditital_input1 (sorry dont remember variable right now) what exactly is digital input 1 hooked up to and/or what is being pressed to set digital input 1 to a value of 1?

also just a thought, can we use switches (as in light switches) and flip them on and off? (dont know too much about how the digital input side wiring goes)
thanks

NoodleKnight 16-02-2005 03:10

Re: Auton digital input
 
digital input 1 is digital input 1 on the Robot Controller (I think, I'm not a programmer...). I believe the recommendation was that you could hook up a switch to a digital port on the RC, then during autonomous mode, have the code check the state of the digital switch and run the corresponding autonomous program.

ten3brousone 16-02-2005 03:30

Re: Auton digital input
 
Quote:

Originally Posted by NoodleKnight
digital input 1 is digital input 1 on the Robot Controller (I think, I'm not a programmer...). I believe the recommendation was that you could hook up a switch to a digital port on the RC, then during autonomous mode, have the code check the state of the digital switch and run the corresponding autonomous program.


any idea how our electronics girl would wire the switch? i think its you ground one side and connect other to input? btw would it be possible to have a switch on the joystick controller board? (to use as a toggle switch)

Billfred 16-02-2005 08:55

Re: Auton digital input
 
http://www.ifirobotics.com/docs/rc-r...01-31-2005.pdf

The manual is your friend here...page 10 deals with Digital I/O.

Cheers!

phillutz 16-02-2005 11:18

Re: Auton digital input
 
1.Wire a switch to contact the outside 2 pins of the digital input XX.
2. Declare the digital pin as INPUT
3. In code read rc_dig_inXX where XX is the pin.


We have a series of 11 being used. ;)

sirbleedsalot 20-03-2005 18:38

Re: Auton digital input
 
What method do you use to connect the switch to the ground and signal pins on the rc. The only thing I can think of is hacking up a bunch of pwm cables, but that seems like a waste of cable to me.

Joshua May 20-03-2005 18:44

Re: Auton digital input
 
Quote:

Originally Posted by sirbleedsalot
What method do you use to connect the switch to the ground and signal pins on the rc. The only thing I can think of is hacking up a bunch of pwm cables, but that seems like a waste of cable to me.

I believe somewhere in the FIRST documentation it says to hack a PWM cable for these. I guess it would be possible to take some small gauge wire and run that from the switches to the inputs, but you would have to make sure that the wires coming to the pins dont short in that small space, and im not sure of the legality. I would just recommend sticking with the PWM cables.

Alan Anderson 20-03-2005 22:23

Re: Auton digital input
 
Quote:

Originally Posted by sirbleedsalot
What method do you use to connect the switch to the ground and signal pins on the rc. The only thing I can think of is hacking up a bunch of pwm cables, but that seems like a waste of cable to me.

So buy the connectors and pins that are used in a pwm cable and use them instead of chopping a $5 cable in half. I bought a batch of them from the Hanson Hobbies RC eBay store. It works out to about 60 cents per connector, plus wire.


All times are GMT -5. The time now is 17:32.

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