View Single Post
  #3   Spotlight this post!  
Unread 18-05-2010, 10:15
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,801
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: Programming EasyC

Using Ryan's wiring the code might look something like this:
Code:
Channel5=Get RxInput (1,5);
Channel6=Get RxInput (1,5);
 
if (Channel5 == 1) {
    // forward
    Set Digital Output (1,1);
    Set Digital Output (2,0);
} else if (Channel6 == 1) { 
    // reverse
    Set Digital Output (1,0);
    Set Digital Output (2,1);
} else {
    // stop
    Set Digital Output (1,0);
    Set Digital Output (2,0);
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle