added communication with ADC, modified distance to correctly read ADC