View unanswered posts | View active topics It is currently Wed Aug 27, 2014 11:10 am






Reply to topic  [ 10 posts ] 
VEX peripherals: joystick unable to find key 
Author Message
Rookie

Joined: Wed Dec 08, 2010 3:20 am
Posts: 6
Post VEX peripherals: joystick unable to find key
Hi,

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?
Thanks

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


Tue Dec 14, 2010 2:01 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post 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

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Wed Dec 15, 2010 2:29 pm
Profile
Rookie

Joined: Tue Dec 07, 2010 11:51 am
Posts: 4
Post 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):
-1st
Joystick: Green
VEXnet: slowblinking orange
-then:
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.

Thanks


Thu Dec 16, 2010 5:43 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post 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?

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Thu Dec 16, 2010 10:02 am
Profile
Rookie

Joined: Wed Dec 08, 2010 3:20 am
Posts: 6
Post 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....
Code:
task main ()
{
  writeDebugStreamLine("TESTING");
  wait10Msec(200);
  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]);
    wait10Msec(10);   
  }
  SensorValue[LED1]=0;
  while(1 == 1)
  {
    wait10Msec(200);
  }
}

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


Thu Dec 16, 2010 10:22 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post 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: http://www.education.rec.ri.cmu.edu/products/teaching_robotc_cortex/reference/VEXnet_joystick_calibration.pdf 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...

Code:
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

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Thu Dec 16, 2010 10:39 am
Profile
Rookie

Joined: Wed Dec 08, 2010 3:20 am
Posts: 6
Post 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...


Thu Dec 16, 2010 12:14 pm
Profile
Rookie

Joined: Tue Dec 07, 2010 11:51 am
Posts: 4
Post 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?


Thu Dec 16, 2010 12:34 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post 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: http://content.vexrobotics.com/docs/Cortex_UserGuide_1010.pdf It's not ROBOTC specific, so you'll still need to follow the ROBOTC setup afterward.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Fri Dec 17, 2010 10:22 am
Profile
Rookie

Joined: Wed Dec 08, 2010 3:20 am
Posts: 6
Post Re: VEX peripherals: joystick unable to find key
Update:
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 =)


Thu Jan 13, 2011 3:50 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.