For our last competition, I made a p-controller for the 4 bar with the inputted target being motor ticks. This target position was difficult to convert to actual height without just guessing. I was wondering the math of how motor ticks could be converted into arm height, and vice versa. Thanks.
Make sure you reset the ticks when it’s all the way down. Then, make a program to print the encoder value to the brain and/or controller, and record the new value when the lift is all the way up. Measure how many degrees it traveled, and divide the encoder value by that. This will give you the number of ticks/degree. From there, convert it to degrees, and you can use that and the arm length to figure out its height with trig.
Just beware of gear slippage which could give false readings
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.