Go to Post I can tell you that I feel happiest when I am giving or doing for others. I do not expect anything in return but just knowing that I can make things better, in my small way, makes me happy. - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2012, 18:37
kingpinzs kingpinzs is offline
Registered User
None #4086
 
Join Date: Feb 2012
Location: Idaho
Posts: 2
kingpinzs is an unknown quantity at this point
Need help getting spike relays working

Code:
Relay hopper;

hopper(1);

if(joybutton(1));
{
  hopper.Set(Relay::kOn);
  hopper.Set(Relay::kForward);
}
It doesnt do anything at all.

How do I get the spike relays working to test?
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2012, 19:59
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Need help getting spike relays working

Ok, for my code, I don't need the kOn at all.

Is the PWM wire properly plugged into the Relay side of the DSC instead of the PWM side?

Also when the button is pressed, what do the lights next to slot 1 of Relay do?

And do the lights on the Spikes change?

If the answer to the first 2 are yes, and the third no, try messing with the wire more (or a different 1).

SideNote:
WhooHoo, 100 posts!
And congrats on your 1st post!
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2012, 20:38
kingpinzs kingpinzs is offline
Registered User
None #4086
 
Join Date: Feb 2012
Location: Idaho
Posts: 2
kingpinzs is an unknown quantity at this point
Re: Need help getting spike relays working

1. Yes but both were tried
2. the lights don't even come on
3. the lights don't change
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2012, 20:48
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Need help getting spike relays working

By any chance are the lights on the Relay side red by even when not enabled?
Also are all 3 green lights on the DSC?
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2012, 23:42
kccowan kccowan is offline
Registered User
AKA: Ken Cowan
FRC #1073
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Hollis, NH
Posts: 17
kccowan is an unknown quantity at this point
Re: Need help getting spike relays working

Quote:
Originally Posted by kingpinzs View Post
Code:
Relay hopper;

hopper(1);

if(joybutton(1));
{
  hopper.Set(Relay::kOn);
  hopper.Set(Relay::kForward);
}
Check out Relay.cpp in WPILib. Relay have a direction, kOn sets both forward and reverse. kForward sets only forward. If it was wired correctly, I'm guessing you want to remove the kOn call.

KC
Reply With Quote
  #6   Spotlight this post!  
Unread 21-02-2012, 01:32
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: Need help getting spike relays working

Relays won't do anything if the robot is disabled. Did you enable it from the Driver Station when you ran the test?
Reply With Quote
Reply


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 02:33.

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