Sample code for Windriver needed (FRC)

Help Please!!!

In the workbench.

File->New->Project->Examples->VxWorks Downloadable Kernel Module Sample Project

Choose any example project that starts with “FRC”.

Thank you so much but it seams I don’t have anything that has “FRC” in the beginning. Is there an update I have to download??? please help

OK. We figured out where to get the update but all they all are for arcade drive or tank drive but we have a more complex wheel setup. We would really be amazingly better off if we could figure out how to simply receive values from several joysticks, label give the values to common variables, and know how to assign the variables to jaguars to make the motors move. It seems like a complex list but If someone could just post some code (even from yours, you can trust me I won’t plagiarize) that would be great.

What kind of complex setup do you have? WPI library provides a lot of different drive configurations, tank drive, arcade drive, mecanum drive. You can look at the WPI source code in robotdrive.cpp (c:\WindRivier\WPILib). It shows you how they implemented all different drives. So it is your sample code if you want to write your own drive system.

I’ve posted a complete C++ program here:

It incl. arcade drive, I understand you want to write your own drive code. The code shows how to read (obtain) the values from a joystick and drive a Jaguar/Victor with that value. Joysticks give a value between 1.0 and -1.0, inclusive, in the X, Y, and Z axies. (The Z axis is the throttle thing at the base of the JS.)

Victors and Jaguars accept values -1.0 <= x <= 1.0. The direction of rotation is a function of how the motor is wired and the nature of the gearbox.

The algebra in between the JS and the Jaguar is up to you :slight_smile:

Whenever you change the drive code (incl. the first version) YOU MUST TEST WITH YOUR ROBOT ON BLOCKS with the wheels off the ground. There’s a real risk of the motors being powered other than as you expect and the robot smashing into an object - I’ve seen it happen.