adc now with double buffering
merged Wolfgangs changes