Logging Data of Vex Joystick

Me and my team were looking for a way to log data from the joystick by using ROBOTC or PROS. It would be very helpful if anyone could give any ideas.

You are using Cortex right?

1 Like

Yes. We are using Cortex.

1 Like

My guess is that you want to record how people are driving the robot and then have it do the same in autonomous.

If that is the case then you want to tap that search button on top of the screen and look for “rerun”.




I looked it up but i couldn’t figure out how to connect the controller and the robot to the computer at the same time. Is there another way to log the controller logs?

Since you mentioned ROBOTC you must be using Cortex.

Also, I assume you have an orange programming cable that connects joystick to the computer.

Then you can use http://robotc.net/w/index.php/Debug_Stream to send data from Cortex back to robotc debug stream window.

Also, if you have VexNet keys for wireless connection between joystick and robot, you may experience slowdown. Instead we used to connect joystick to cortex with really long A-A usb cable to make it faster. For example, this one:


Sorry for late response. How would i use debug stream in that way? (how can i cache it?)

The VEX CORTEX does not store any data other than a single program that you upload to it, so you cannot physically log any data within the CORTEX. The only way to log data from the CORTEX is by connecting the controller to the comptuer using the programming cable and use the debug stream as [above]. There should be plentiful articles and examples on printing into the output from the past, so search away.

How to print to debug stream:


I coulnd’t find any articles about printing out past debug streams or output from the past. Can anyone please help? Sorry for asking too much questions.

writeDebugStream("int x is: %d", x);  // writes the current value of int 'x' to the debug stream

This type of way of printing is used in other coding langauges as well. Here’s an example that describes a bit of how o can add multiple variables:

Theres no other way, to be honest, for the VEX Cortex. You will have to use the debug stream.

But, I believe that even when a program ends your computer will still temporarily store the output log for you to copy for use.


Sorry if i am being dumb . (I know how to write to debug stream) I couldn’t understand how to see it afterwards i run?

You open debug stream window in robotc and then copy and paste the output text to wherever you need it.


So i will write the code according it gets joystick values to the debug stream, download it to the robot, use the joystick, connect it to the computer again, download again to open the debug stream? And see it?

First you connect joystick to computer with the orange cable let it connect to the robot by wireless VexNet or with another A-A to the Cortex.

Then withing robotc ide open Debug Stream window and then start the program in the user mode. As you drive the robot with joystick your program calls writeDebugStream() and its output shows up in the debug stream window.

After you done you can select that text and the copy and paste it into another program.

These are older robotc tutorials, but they are still helpful:

1 Like