I would like to take the absolute value of 2 unsigned 10bit adc readings. All I want is to see if the difference between these 2 10bit ADC readings is greater than 10.
I know about underflowing with subtraction, and that apparently you cannot use Abs() with unsigned variables.
IS THERE ANY WAY TO DO THIS IN A LESS CONVOLUTED MANNER?
So to find out if Delta ADC1-ADC2 is > 10. I am going to use the
following code:
unsigned long int adcvalue1;
unsigned long int adcvalue2;
unsigned long int result;
unsigned int holdingvariable_a;
unsigned int holdingvariable_b;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum