Quote:
Originally Posted by darkdwarven
Code:
if (rc_dig_in07 = 0)
|
This tries to assign the value
0 to the
rc_dig_in07 variable. It also has the side effect of never being true. You want instead to test for equality.
In short, replace the
= with
==.
Some people use the technique of always putting the constant on the left in a test like this. That way the compiler will notice and complain if you accidentally use a single equals sign.
Oh, and your test is backwards. The IR receiver board outputs
0 when nothing is detected, and gives a 100 millisecond
1 pulse when a valid signal is received.