Quote:
Originally Posted by Team2002
I was trying the following for our IR board and nothing seems to happen
if (rc_dig_in15 == 1)
{
pwm_13 = 256;
}
This was just to test if pressing a button on the remote did anything (the remote was already programmed etc,.)
is there anything wrong that we are doing?
This snippet was placed in the user_routines.c
is that the correct place or should it be under user_routines_fast.c?
Thanks for any help
|
I am not 100% positive on this, but here is my thoughts and what to try.
The rc_dig_in7 - 18 are tied high when they are set as inputs. If they are considered active when a switch is closed across them to ground, and the output of the IR board goes high when it is active, then you need to test for a !rc_dig_inxx. So try:
Code:
if (rc_dig_in15 == 0)
{
pwm_13 = 256;
}
OR
Code:
if (!rc_dig_in15)
{
pwm_13 = 256;
}
Again, I am not a pro at this, just a learner at this point.
BTW, the signal will pulse, so hold the button down.