Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Programming VEX Controller (http://www.chiefdelphi.com/forums/showthread.php?t=45132)

HRobotics 07-03-2006 16:42

Programming VEX Controller
 
Hi;

We're having a few problems programming our controller with the VEX easyC (we realise that the VEX season is over, but we're still working on it, so we're still having issues). (We've searched this issue quite a number of times... couldn't find anything... if there are any other threads that deal with this, we'd be grateful for a link.)

So the scenario is: We would like to use 5 motors in our robot. 2 motors will be controlled by 1 joystick that makes it go up-down-left-right (to control the robot). The other 3 will be for the arm.

So the problem is: We want to use 2 motors to move the arm forwards and backwards ; the other, to move the scoop up and down. If we use the arcade (-2 motor) for the arm, we wanted to make the arm go back and forward with the *up arrow* and *down arrow* of the joystick. We wanted to use *right arrow* and *left arrow* for the claw, but when one turns, the joystick goes to the left or right, and that causes both motors to go in reverse. This will cause problems. (I really hope that made sense...)

We'd also like to know if there is a way to program the controller without using the preset functions like arcade or tank. If there isn't, is there an alternate way to address this problem?

Thanks,
HC Robotics (Katherine + Hilary).

Cuog 07-03-2006 19:28

Re: Programming VEX Controller
 
you can program the VEX with MPLAB and the mcc18 compiler look around vexrobotics.com and some other vex sites and you should come accross the default code and the IFI Loader you will need

Kingofl337 12-03-2006 17:34

Re: Programming VEX Controller
 
You can write directly to the set motor function in EasyC. Just get the data from RX Input assign it to a variable and then play with it as you wish and dump
the value back into the motor.


//Could someone move this to the VEX EasyC forum?

P.S. A64 all the way.

Jackel148 21-03-2006 22:23

Re: Programming VEX Controller
 
Quote:

Originally Posted by HRobotics
Hi;

We're having a few problems programming our controller with the VEX easyC (we realise that the VEX season is over, but we're still working on it, so we're still having issues). (We've searched this issue quite a number of times... couldn't find anything... if there are any other threads that deal with this, we'd be grateful for a link.)

So the scenario is: We would like to use 5 motors in our robot. 2 motors will be controlled by 1 joystick that makes it go up-down-left-right (to control the robot). The other 3 will be for the arm.

So the problem is: We want to use 2 motors to move the arm forwards and backwards ; the other, to move the scoop up and down. If we use the arcade (-2 motor) for the arm, we wanted to make the arm go back and forward with the *up arrow* and *down arrow* of the joystick. We wanted to use *right arrow* and *left arrow* for the claw, but when one turns, the joystick goes to the left or right, and that causes both motors to go in reverse. This will cause problems. (I really hope that made sense...)

We'd also like to know if there is a way to program the controller without using the preset functions like arcade or tank. If there isn't, is there an alternate way to address this problem?

Thanks,
HC Robotics (Katherine + Hilary).

We were having the same problem you might find it easier if you just put the turning motions or the forward and backward motions on the switch that is on the bottom of the controler...the problem is that the joysticks are two sensative to the other motions as well (such as up and down)

let me know if you need any more help if you want just email me the easy -C from a screen shot and I will look at it for you

but know their are no other presets to get aaround the tank and arcade sorry :(

I hope this helps

Jackel

artdutra04 21-03-2006 23:25

Re: Programming VEX Controller
 
Code:

          Left Joystick:                          Right Joystick:
          [drive fwd]                              [arm up]
                ^                                      ^
                |                                      |
[drive left]<------->[drive right]      [claw open]<------->[claw close]
                |                                      |
                v                                      v
          [drive rev]                              [arm down]

Using the joystick as mapped above, try using this code: ;)
Code:

#include "Main.h"

void main ( void )
{
      unsigned char arm; // Create a unsigned char variable called arm

      while ( 1 )
      {
            // The Arcade Drive Code Block
            // Connect The Left Drive Motor to Port 1
            // Connect The Right Drive Motor to Port 2

            Arcade2 ( 1 , 3 , 4 , 1 , 2 , 0 , 0 ) ;
            // The Arm Drive Code
            // Connect the Arm Motors to Ports 3 and 4
            arm = GetRxInput ( 1 , 2 ) ;
            SetPWM ( 3 , arm ) ;
            SetPWM ( 4 , arm ) ;
            // The Claw / Grabber Code
            // Connect the Claw Motor to Port 5
            MotorRcControl ( 1 , 1 , 5 , 0 ) ;
      }
}



All times are GMT -5. The time now is 15:47.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi