Powering a Non-VEX Servo Using V5 Brain?

Hi, I’m trying to figure out if there is a way to use the 3-wire ports on the V5 brain to power a TowerPro SG92R servo. I’m doing this for a school project not a competition robot, and I’m currently using VEXCode. I’ve looked for documentation for 3-wire ports but have only been able to find how to read a value from a VEX sensor. I also found the pwm_out class but I don’t know how to declare it because it asks for a “triport” and I don’t know what to put there as shown in my screenshot. I’m going to experiment with Simulink (https://au.mathworks.com/help/supportpkg/vexv5/ug/servocontrol-example-vexv5.html) but I would like to know if there is a simple way to do it in VEXCode.17

vex::pwm_out finger( Brain.ThreeWirePort.A );

or

vex::pwm_out finger = pwm_out( Brain.ThreeWirePort.A );

configures pwm_out on legacy port A.

3 Likes