Greetings,

I would like to program the arduino functional equivalent of an electronic window comparator. I’ve been building these for years using a pair of LM339 comparators…

What I would like to do is to take an ADC measurement, store the result of that measurement in a variable, and do math something like this…

if x > 100 and x <200 then…

This is my first time around with C++, which is quite intuitive and much more friendly than I thought it would be. I’ve read up and found most of the information I need. I remain curious if a pair of mathematical functions can be performed on a single line.

Thanks,

Rich