V5 Read Motor Voltage

Hi. I am working on a program to record Robot information with a SD card. I would like to read V5 motor voltage during runtime. Working with VexCode. I was poking around in the Vex SDK and noticed this.

vexMotorVoltageGet(index);

Would the following work?

LeftFwdRecord[i]=(double)vexMotorVoltageGet(1);

If not, how else should I access voltage numbers?

that would work. probably better to use port number, port1 is 0.

int32_ volt_mv = vexMotorVoltageGet( vex::PORT1 );

Not everything that’s available in the C API was added to the motor class.

1 Like