Collect Information from the Cortex

Our team is hoping to do some really cool things with code this year, one of the main things we need though is the ability to pull information from the cortex.

Anyways, what I would like to do is collect information from the cortex every so many milliseconds. Information like battery voltage, amperage, sensor values, and any other needed information. It must also subsequently be available on a computer for analysis. We need it for some special testing we will be trying to do.

Other info: We are using RobotC 4.26

Thanks in advance for you help!

Three ways.

  1. Save the data in memory.
  2. Send to the debug stream or directly to the system UART.
  3. Send to one of the two external UARTs

I usually use method 2 or 3.

See this for more on method 2
Send Debug data to Hyper Terminal

One way you could do this is to set it up in the debugger window and get a camera and record the data from the computer onto the camera while testing so you can go back and record the data given off every so often. Or you could do the same thing if you can record the computer screen with a special software. But I don’t know how you could record the voltage or amperage. Hope that helps.

Thanks for your reply JPearman! I have just two more questions (for now).

  1. How would I go about setting this up?

  2. What all information can I collect about the robot battery? I have tried to look this up before a couple times and I was unable to find what I was looking for.

An alternative to a debug stream would be to write the values to a file on the cortex with PROS. You can then read the file off through the IDE and compare/contrast with other tests.

Create a task that sends data to the debug stream at a defined interval. It probably won’t work well with an interval as low as 5mS, but 20mS should be ok if you don’t send too much data. It works best when using the USB A-A tether cable between cortex and joystick, it’s not so good with the VEXnet 2.0 keys.

All you can collect for the battery is the voltage.

Okay awesome! I think I now know what I need to. If I still need some help later, I guess I’ll just revive this thread :smiley:

Thanks!

An Arduino with a memory card is another alternative. UART out from cortex into the Arduino.

You can buffer a ton of data in the Arduino. Somewhat lighter weight and reduces tethering needs.

You could also go Xbee route on the Arduino to get to the PC.

https://vexforum.com/t/vex-and-the-xbee-radio/22507/1