Sample easy C code for potentiometer on scissor lift

Does anyone have any sample easy C code (Id probably be able to figure out the easy C code from c code as well if you have sample code in that type of format instead) for potentiometers on each side of a scissor lift (presumably on the center 60 or 84 tooth gear) see attached image. I would primarily like the code to be able to self correct during driver control. Although sample autonomous code with potentiometer usage would also be helpful.

Thanks for any help you are willing to offer.