Problem with easy c pro and mechanum wheels

We are trying to write some code in easy c pro to control our mechanum wheels. I have seen the code from team 40 and it is does not do what we want it to do. Each mechanum wheel has its own drive motor and we are controlling them with 2 joysticks in the tank format. We would like to have our x axis of our joysticks control the movement left to right with the mechanum wheels (move both joysticks left, straif left. Move both joysticks right, straif right).

Here is the problem, I have written the code to control it in tank setup, and I have written code to control the straif setup. Independently, the two work fine, but I cannot figure out how to join them together. When combining the two, the robot spazzes out all the motors at once. I can still control the robot but it is not smooth at all.

My code is attached. Please help.

Thank you

tank.zip (15.6 KB)


tank.zip (15.6 KB)

So you want the robot to drive forward like a tank.
Two sticks forward.

You want it to rotate like a tank
One stick forward and one back.

You want to strafe side to side with one stick or both?

That is correct. Although, today I have found my problem, and now it works perfect. Well, almost. All the wheels do not move at exactly the same speed and the robot drifts a little bit, but I think the problem could be our joysticks.

But I do have another question. I have heard that in Easy C Pro you can type in the code manually instead of using the flow chart. But I cannot figure out how! I checked the help file. It says that you can, but I cannot figure out how. How?

Does your mecanum drive have any feedback installed or is it completely open loop? If it’s open loop, the problem is probably not with your joysticks – but with the inherent inequalities in the mechanical properties of the motors and gearboxes controlling each wheel.

You click on the Project Tab and Add a source file by right clicking on “Source Files”. You can also right click on a function you have created and right click and convert it to “C” code.

Also, we had some trouble with the encoders coming loose at the end of the season and it caused issues
with the robot drifting while driving strait. So we went open loop and it was better then malfunctioning encoders
but not a whole lot.

Thanks for the help!

So, for example, we cannot edit the operator or atonomous function because we did not create it ourselves?

Also, we are havin a big ole problem. We cannot figure how to make the camera track in easy c pro. I cannot find an example of the camera tracking in easy c pro. HELP!

Our program team found this a helpful start: easyC PRO - Intelitek

Is there any example of someones code for the camera written in easy c pro?

Download the “2007 Kickoff Demo Code” on the Intelitek Downloads page - this code tracks the target lights.
http://www.intelitekdownloads.com/easyCPRO/

There is also some demo graphics display camera code is Test Code / Graphics Display.