use the ADC interrupt instead of a contiki process to sample