code to read 3 adc values