Quote:
|
Originally Posted by Doug Leppard
When I complied the FRC code in the VEX the following variables were not defined:
'p1_x' has not been defined
'p1_y' has not been defined
'p3_wheel' has not been defined
'p1_wheel' has not been defined
'p1_wheel' has not been defined
|
You need to look at what those mean, exactly, and translate that to Vex.
p1_x is OI port 1, the "X" direction. This would possibly translate to Channel 1 on the Vex controller. But, of course, you can define it as Channel 3 (which is "X" on the left joystick instead of the right), or anything else you like.
p1_y might be channel 2
The three "wheel" values are the switches on the little thumbstick on the standard KOP joystick. It is also an analog input (like X and Y) and has no equivalent on the Vex controller. Maybe a good use for Channels 3 and 4 or, with some limits, channels 5 and 6.
As a hint, you'd use the "RX Input" block.
Look at this
schematic to help in understanding what the joystick does, and then you can think about how to replicate that functionality on the Vex controller.
Note that the FRC OI is a LOT more versatile than the Vex transmitter.
Don