Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Single Solenoids (http://www.chiefdelphi.com/forums/showthread.php?t=63689)

mormannoob 09-02-2008 22:10

Single Solenoids
 
I need help my team is using a single solenoid on our robot and me and our programming team is unsure on how to program one (we've always used double solenoids in the passed) any help,code, suggestions on material to read will be greatly appreciated.

thanks
from the Team 498 programming team and especially their captian(me)

eaglesfan10 09-02-2008 22:19

Re: Single Solenoids
 
I think single solenoids are actually easier. You just need to change one variable in the code so one position will look like this:
relay1_fwd = 1;
and the other position would look like this:
relay1_fwd = 0;

mormannoob 09-02-2008 23:12

Re: Single Solenoids
 
so if i wanted to i could do
#define punch_relay relay1_fwd

then

punch_relay = EXTEND; (presumming i set EXTEND = 1)

eaglesfan10 09-02-2008 23:20

Re: Single Solenoids
 
Quote:

Originally Posted by mormannoob (Post 695566)
so if i wanted to i could do
#define punch_relay relay1_fwd

then

punch_relay = EXTEND; (presumming i set EXTEND = 1)


Sure, and you could even create a variable called RETRACT and set it to 0 and alternate EXTEND and RETRACT based on a button being pressed.

mormannoob 09-02-2008 23:25

Re: Single Solenoids
 
ok thanks for the help figured it was simple i just wanted to make sure i didnt make any mistakes


All times are GMT -5. The time now is 23:44.

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