Code for a 7 Panel LED Display

Also, how would I get a read out of what the potentiometer voltage is? That way i can check my LED display to see if it displaying the correct number