View Single Post
  #5   Spotlight this post!  
Unread 15-02-2005, 23:21
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: URgent Programming Help needed

I couldn't resist. I just posted this code elsewhere for another purpose, but it applies here as well.
Code:
if (p1_sw_trig==1)  // Cylinder one way
{
	relay2_fwd = 1;
	relay2_rev = 0;
}
else if (p1_sw_top==1) // Cylinder the other way
{
	relay2_fwd = 0;
	relay2_rev = 1;
}
else  // Cylinder not moving
{
	relay2_fwd = 0;
	relay2_rev = 0;
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle