View Single Post
  #4   Spotlight this post!  
Unread 13-01-2008, 23:00
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: IR programming and wiring difficulties

P.S. For Easy C specific questions post in the Easy C Pro sub forum: http://www.chiefdelphi.com/forums/fo...play.php?f=164

Maybe something simple like this, although I warn you I didn't test this on a robot yet.
Code:
unsigned char IRcmd1;
unsigned char myservo=0;
 
while(1)
{
    IRcmd1 = GetDigitalInput(1);
    if(IRcmd1 !=0)
    {
        myservo++; 
    }
    SetPWM(1,myservo);
}
Plug a servo into PWM1.
Add a backup battery since that's all that power things plugged into the pwm outputs.
The servo should move from one extreme to the other when the correct button is pushed.
You'd have to cycle the power to get it to reset.
Attached Files
File Type: doc testprog.doc (101.5 KB, 48 views)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-01-2008 at 15:29.