Logitech 310 not working on Cortex

I am trying to control our Cortex with a Logitech 310 USB controller.

Several months ago this worked great both through the PC (debug mode) or by plugging the 310 directly to the Cortex. I did not have to do anything but use the sample code.

2 months late I try it now there’s nothing !

The Joystick debugger shows the Joystick movement / buttons OK

In the loop I set a variable to = vexRT[Ch2] just to see if it’s seeing the data but the debug windows doesn’t list any variables! (globally or local)

So frankly have no idea what’s going on!

I have
Win 10x64
Robot C 4.55 (re-installed & another PC)
Cortex EDR
updated all the firmware (Cortex & ROBOTC)


Uhh with the joystick don’t you use the get joystick functions. Instead of vexRT ]

Check the switch on the back of your f310. It has 2 operation modes and maybe only 1 works with the cortex? X or D
Unplug it after changing the switch position.

Thanks - yes, should have mentioned I tried the joystick.c function as as well - no love. However vexRT worked before…

Thanks -

I read it had to be in ‘D’ (digital) position, which it is. But I will try ‘X’ and see!

Hi all -
I tried

  • joystick function (code below) - no luck
  • 310 on ‘X’ - no luck

It is strange - I go to window - config joysticks and everything appears perfect. When I debug the joystick debugger doesn’t show 310 buttons (jusx XY 1 & 2).

Also I do not see any global or local variables. I declared an
int mctl;
… and set it to
mctl = joystick.joy1_x2;
… in the loop
But see literally nothing in the debug tabs. Also motor debug shows nothing is being sent to it ie joystick.joy1_x2 must be ‘0’.

This was no brainer before now TOO crazy!! Perhaps this is disabled in latest firmware/robotC ?

Thanks for reading!

#include “JoystickDriver.c”

in main - loop:
getJoystickSettings(joystick); // update buttons and joysticks
motor[m6] = joystick.joy1_x1;
motor[m7] = joystick.joy1_x2;

Can this be a bad cortex? But the variables not showing up is bizarre, maybe RobotC?

The file joystickDriver.c is a system file, it has this line of code at the top.

#pragma systemFile

That stops any global variables from that file showing up in the debugger.

I don’t think you could ever do this.

In fact, the logitech is for control of virtual worlds, so I don’t think this would have ever worked.

THANK YOU! Yea, seems hard to imagine it worked, but, it did!

So the only way to control a Cortex is VEX remote? Is there a terminal?

You ought to be able to use a uart port to connect to something like a Raspberry Pi and use other controllers through that if you feel so inclined.

Has anyone tried to interface the original VEX RC Remote Control to the Cortex?