Thread: Vex Cheats
View Single Post
  #6   Spotlight this post!  
Unread 10-04-2006, 01:33
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,289
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Vex Cheats

Quote:
Originally Posted by michael714
Here's something I discovered by accident:

If you use the default program that comes with the VEX (in other words, don't do any EasyC programming), you can control two motors and a servo with the RC transmitter. I just left the transmitter in the default Tank 2 mode and hooked a servo up to motor port 4. After that, I was able to use tank mode to control the two motors in the standard SquareBot setup and I was able to use Channel 3 (on the left) to control the servo. On channel 3, up and down controls the left motor while side to side controls the servo. I'm using the servo to pan a wireless vidoe camera from side to side. It's cool!

One bummer though: when I try to use EasyC to do any programming that includes RC control, this capability goes away. So, I just redownload the default program to get it to work again. If anyone knows how to retain the side to side servo control even when using EasyC 1.1, I'd love to hear about it. Thanks.
All that is happening in the default code is probably a direct write from the value of a channel to the value of the pwm with the same number. The left to right on the left joystick is actually channel 4 (channel 3 is only the up and down), so it is likely the value of the channel 4 joystick is being directly fed to pwm 4, which controls the servo.

There is a function in EasyC that directly writes a channel to a pwm, but I do not remember it off of the top of my head (EasyC is installed on my laptop, not my desktop). I think it is something like RxControl();
Reply With Quote