Analog Sensor with attachInterrupt()

good example for use of the analog comparator
I Think you should add this code snippet to the playground