View Single Post
  #4   Spotlight this post!  
Unread 30-01-2008, 16:19
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,381
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: ir sensor Board ??????????????????????

Quote:
Originally Posted by Team2002 View Post
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.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist