How do I program my battery in my code

The discussion wasn’t really about battery as the OP’s question was clarified and everyone suggested using velocity control to achieve the same shot despite varying battery voltages. I would recommend reading the entire thread before posting.