Go to Post People aren't getting angry at teams who play defense. They are getting angry at the teams who play BattleBots in the middle of a FIRST match. - 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 20-02-2005, 17:02
The yellowdart's Avatar
The yellowdart The yellowdart is offline
Registered User
FRC #1506 (Metal Muscle)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Oakland County
Posts: 22
The yellowdart has a little shameless behaviour in the past
Toggle switch with pneumatic

does anyone know how to program a toggle switch?

we want to use it as an on/off switch
for up / down with our casters

(we want to toggle the state of our relay by pressing a 1 button)

i tried the code for the toggle and was unsucessful

if anyone has any code, please post and say where the lines go

or if anyone knows where i can find some good code, please let me know
  #2   Spotlight this post!  
Unread 20-02-2005, 17:49
thoughtful's Avatar
thoughtful thoughtful is offline
Registered User
FRC #1219 (Emery Iron Eagle)
Team Role: Alumni
 
Join Date: Nov 2003
Location: Toronto,Canada
Posts: 291
thoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to behold
Re: Toggle switch with pneumatic

I am trying to remember this on top of my head so here it goes:

Get a toggle switch. Wire Pin 1 of the DB-15 cable to one pin on the toggle switch. Connect the other pin to 10 on the DB-15 connecter. This should work for pX_sw_aux1 (or aux2: not sure) . X is the port number. I would suggest use port 3 or 4, its on the other side of the OI and mostly easier to layout your OI.

With this all you have to do is

relayX_fwd=pX_sw_aux1;

So when the button is in on position the solenoid is active and in off its not. (this will work for a single solenoid)

you can put the code in user_routines.c under where other relays have values assigned. I dont remember the exact line number.

Any questions are welcomed
__________________
.:Bringling Brains to Life:.

03,04,05-Team 1219 Captain
2003 Rookie all Start @ GTR
2005 Galileo Semi-Finalist & Alliance captain
06-Team 1219 Mentor
2006 Radio Shack Innovation in control @ Waterloo

Last edited by thoughtful : 20-02-2005 at 17:54.
  #3   Spotlight this post!  
Unread 21-02-2005, 14:08
whakojacko's Avatar
whakojacko whakojacko is offline
Registered User
FRC #1072 (hrt)
Team Role: College Student
 
Join Date: Feb 2003
Rookie Year: 2003
Location: San Jose, California
Posts: 137
whakojacko is on a distinguished road
Send a message via AIM to whakojacko Send a message via MSN to whakojacko
Re: Toggle switch with pneumatic

yes that will work, but that only goes one direction. Might you alsos want another line relayX_rev=!pX_sw_aux1;? That way itll go both directions
__________________
Harker Robotics:1072
http://www.harker-robotics.org
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pneumatics on a toggle switch Idaman323 Programming 3 15-02-2005 18:42
Pneumatic pressure switch M. Hicken Programming 9 29-01-2005 23:35
LEDs in switch box. ZZII 527 Electrical 5 06-03-2004 19:39
3 way toggle switch programming LeadRiccardoT Programming 3 17-02-2003 02:02
Need help with 255 Variable Joseph F Programming 18 26-02-2002 14:49


All times are GMT -5. The time now is 10:55.

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