fixed a rounding issue. changed the wait until the ADC is ready.