View Single Post
  #7   Spotlight this post!  
Unread 30-01-2010, 14:00
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Relay Ports on the Digital sidecar have no Power

From page 39 of the WPI Robotics Library Users' Guide, available here (this page should be the apple of your programmer's eye for the next several weeks):
Code:
Relay m_relay(1);
m_relay.SetDirection(Relay::kReverseOnly);
m_relay.Set(Relay::kOn);
(trimmed for my purposes here; see the original document for the entire example)

This code commands a relay on port 1 to drive in reverse. To turn it off, you'd do a
Code:
m_relay.Set(Relay::kOff);
Does that work out for you?

EDIT: You'll really want to read page 38 of that manual. It does a much better job of detailing how to command a relay than I just did.
__________________
Aren't signatures a bit outdated?

Last edited by JBotAlan : 30-01-2010 at 14:02.