PLEASE help coding something like,
if sensor1 is greater than sensor2 by 30 the led is High and vice versa
thank you so much :-[
PLEASE help coding something like,
if sensor1 is greater than sensor2 by 30 the led is High and vice versa
thank you so much :-[
if ((sensor1 - sensor2) >= 30)
{
led = HIGH;
}
else
{
led = LOW;
Maybe.
"Help coding" means you make your best attempt and then we provide assistance to get it working correctly. It doesn't mean we write your code for you.
Also having some useful information about what the sensors are and where they are connected and where the led is connected may be important too.
Steve