What are the Pros and Cons of coding in voltage?

I was planning on coding in voltage for the drive train and the rest of the robot in our autonomous code and driver control. I wanted to know the pros and cons behind because I heard that the best way to code for the robot is using voltage.

If you are using PID, use voltage. If you are not, than probably don’t. Using voltage sends voltage to the motor, which means the motor will be turning. Not using voltage will use internal PID to make constant movement. So if you set the motor running at voltage, it will send motor power at that voltage regardless of whether the motor is moving. The other commands will ensure that the motor is moving, at the designated speed. For drive? Yeah voltage would be okay. For things like a lift or tilter? Probably not the best idea.

4 Likes

I have physically tested the two commands and printed their motor speeds. Because voltage doesnt have a programmed cap, the motor will have a max speed that is 1.2-1.25x faster than the other commands. :wink:

5 Likes

What is your opinion on using voltage for the lift and tilter?

I never use any spin command other than voltage. Voltage is the best method for drivetrain and allows me to code my own lift and tray PID with code. I have tutorials for coding voltage on my YouTube channel :slight_smile:

4 Likes