VEX peripherals: joystick unable to find key
Page 1 of 1

Author:  neso [ Tue Dec 14, 2010 2:01 pm ]
Post subject:  VEX peripherals: joystick unable to find key


I know this is not strictly a programming issue, but was hoping to get some input from experienced users her e =)
Having trouble with the VEXnet control pad not finding the VEXnet key plugged into it.
It's blinking indicates that it has tethered to my Cortex all right, but it cannot find either of my 2 VEXnet USB keys.
Firmware is freshly reinstalled via RobotC on both cortecx and pad.

Any tips?

[edit] the installed firmware came with RobotC for IFI Cortex/pic 2.30

Author:  jbflot [ Wed Dec 15, 2010 2:29 pm ]
Post subject:  Re: VEX peripherals: joystick unable to find key

Hi Neso -

What symptoms are you experiencing that tell you the VEXnet keys aren't being recognized? For instance, is a remote control program loaded on the robot, but the program isn't working? Please provide some additional detail, so that I can better figure out what's going wrong.

There are a few things you can check, all the same:
- Can you remote control the robot when it is tethered directly to the joystick using the USB cable?
- Is your VEX Cortex Download Method in ROBOTC set to Download over VEXnet or USB?
- Have you tried one of the Remote Control Sample Programs in ROBOTC, which have been tested and are verified

Author:  norsmi [ Thu Dec 16, 2010 5:43 am ]
Post subject:  Re: VEX peripherals: joystick unable to find key

Hi, we are both working on same project..
To start with, Thanks for your support!

I loaded the program "Single Joystick Control ADVANCED.c" with an extra future to turn a LED on when inside an if-case. I tried to run the program when tethered to the joystick with USB. The only LED that turns on is the LED "inside" the else case. so it does not respond on my commands.
But the VEXnet LEDs goes green on both VEXnet joystick and the Cortex (when tethered with USB).

Yes, I used the setting "download Using VEXnet or USB"

When trying to connect them with VEXnet with same sample program I got from the joystick (after startup feedback):
Joystick: Green
VEXnet: slowblinking orange
Joystick: Green
VEXnet: fastblinking orange
-at last:
VEXnet: a short green and then red blinking

On the Cortex I get:
-1st VEXnet: fastblinking orange
-then: VEXnet: slowblinking orange
-then: VEXnet: fastblinking orange
-at last: VEXnet: nothing
(the "GAME" LED is blinking orange as well)

The controller is loaded with "wexnet joystick firmware", "WIFI_OI_2p0_V2_3.bin"
And the battery is loaded.


Author:  jbflot [ Thu Dec 16, 2010 10:02 am ]
Post subject:  Re: VEX peripherals: joystick unable to find key

It sounds like the batteries in your joysticks might just be very low. Fresh batteries provide about 2 hours of use out of the joysticks. Also, do you want to post your code, just so I can verify nothing there is messing you up, either?

Author:  neso [ Thu Dec 16, 2010 10:22 am ]
Post subject:  Re: VEX peripherals: joystick unable to find key

More info:

When connected through VEXnet, the Joystick's last behaviour is: VEXnet LED blinking red, it is actually double-blinking.
According to the User Guide off of the vex homepage, thats the error code for "NO VEXnet Key detected"

The blue LEDs on the Keys are lit.

When connected by USB wire, the VEXnet LEDs on both ends are green but, as norsmi said, Joystick values are not read properly. Buttons seem to be permanently 0, joystick axes 0 or 1.

Below is some testing code....
task main ()
  SensorValue[LED1]=1; //Show external sign that data sampling is going on
  for(int i=0;i<100;i++)
    // Record all the positions of button group 8 every 10ms for 10s
    writeDebugStreamLine("channels: %i %i %i %i",vexRT[Btn8D],vexRT[Btn8U],vexRT[Btn8R],vexRT[Btn8L]);
  while(1 == 1)

The LED (I left out some #pragmas at the top) lights up, and the debug stream is filled with lines of "channels: 0 0 0 0"
Batteries are delivering 8.7V, the Joystick has been used maybe 15 minutes total. Time to replace already?
Thanks for your input :)

[edit] comments in the code

Author:  jbflot [ Thu Dec 16, 2010 10:39 am ]
Post subject:  Re: VEX peripherals: joystick unable to find key

Regarding battery life, with 15 minutes of use you should still have plenty of battery left. Keep in mind, though, that the two hours I mentioned was the joystick just being turned on - not just being used to press buttons and move the joysticks, ect. The joysticks drain battery any time they are turned on.

The joystick may also need to be calibrated to get the correct values. We have a document on how to do so here: The calibration process will affect the joysticks, but not button presses.

Regarding your debug stream output, I believe all of your "%i" should be different letters...

writeDebugStreamLine("channels: %i %j %k %l",vexRT[Btn8D],vexRT[Btn8U],vexRT[Btn8R],vexRT[Btn8L]);

Also, you should consider testing something a little more standard/straight-forward, just give you a baseline of what's working and what isn't working. I'd recommend testing one of the standard remote control sample programs, unchanged, just to see if you get motor control

Author:  neso [ Thu Dec 16, 2010 12:14 pm ]
Post subject:  Re: VEX peripherals: joystick unable to find key

I've tried calibrating joystick axes, holding 6U and pressing config, but none of the LEDs ever turned red.

Another interesting thing is: when connecting the Joystick to the computer by wire (VEXnet LED green, so should have contact) and entering the RobotC menu
    Robot ->
  • Remote Control Troubleshooter ->
  • VEXnet Cortex Controller
the window pops up, but vanishes after a few seconds...

Author:  norsmi [ Thu Dec 16, 2010 12:34 pm ]
Post subject:  Re: VEX peripherals: joystick unable to find key

one small add-on there..
We can calibrate it when the joystick is connected to the computer by wire.
Then the joystick behaves like said in the calibration document.
But does that help us?
Or is the calibration saved on the microcontroller?

Author:  jbflot [ Fri Dec 17, 2010 10:22 am ]
Post subject:  Re: VEX peripherals: joystick unable to find key

Regarding the Remote Control Troubleshooter - what you experienced is the expected behavior when the joystick is directly hooked up to the computer. ROBOTC does not have direct access to the joystick values, even when it is directly connected. Rather, the Remote Control Troubleshooter works when the USB-to-Serial cable is connecting the computer to the joysticks, and the joysticks are connected to the Cortex microcontroller. The joystick values flow from the joystick to the Cortex, back through the joystick and into ROBOTC (round-about, I know, but there's no direct access in the joystick firmware yet)

For the calibration to work, I believe it must be connected to the Cortex over VEXnet.

The other document that you might try to follow is this one: It's not ROBOTC specific, so you'll still need to follow the ROBOTC setup afterward.

Author:  neso [ Thu Jan 13, 2011 3:50 am ]
Post subject:  Re: VEX peripherals: joystick unable to find key

It turned out to be a firmware problem, which was known by developers and fixed at around new-year by an updated (beta version, 1.2.1 I think it was) VEXnet Firmware Upgrade tool.

If doing this yourself, remember to update the ROBOTC Firmware on the Cortex when done.

Thanks for all the help =)

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group