Seems ADC and input functions work. For ADC function it was an error in result return. It was written in worng place. Now it is fixed.