the diagram shows how to use an adc or comparator for flex sensor