I'm building a pulsed electrical discharge machine.
I trying to find a way in code of comparing an analogue input to see if it falls within a +/- positive voltage range.
For example if i read 3v in on the input i want to see if it falls within the range of 2.5v and 3.3v, if it does then do nothing or if below the lower threshold it would provide a result which drove a motor in one direction and if above drove a motor in the opposite direction.
in effect a window comparator.
My intuition, knowledge, skills and google are all letting me down.
your help would be much appreciated, a code snippet would lead to an explosion of joy.