Log in

View Full Version : Connecting IR Board


Gizmo2417
17-02-2008, 22:15
Tomorrow is our last day of work on the robot, and we're just getting to the IR board, so quick responses are highly appreciated. :rolleyes:

To power the board I just come in from the breaker panel and connect to pins 1-2, then go back to the breaker panel with a ground wire from 3-4 right?

If so, then how do I get signals to the board from the controller? Connect it to the white wire of a PWM cable attached to the digital IO?

After we get that, programming help would be awesome. Thanks! :D

usbcd36
17-02-2008, 22:41
The IR board will have four connections to the RC, one for each of the signals. The exact pins those signals are from can be found in the IR board manual (http://www.usfirst.org/frc_decgift/). You will need to use a minimum of two PWM cables to hook up the four pins. One can go across three sensor pins, and another can fit normally.

Programming would depend on what application you're using.

Gizmo2417
18-02-2008, 00:06
Ok, that's what I thought. I read the manual. I'm assuming I'm correct in wiring the board?

Also, I use easyC. Thanks!

BenB
18-02-2008, 00:17
This might be helpful

http://www.youtube.com/watch?v=ANo4sKunvXc

Gizmo2417
18-02-2008, 00:54
Thanks, I'll look into that when I get to a computer with faster internet... :rolleyes:

Stvn
18-02-2008, 01:58
As an alternative way to power the board, you could connect the power and ground wires to an unused PWM output. The 7.2 volts from that is enough for its operation.

Here's the code we're currently using to get the inputs (using WPILib):
unsigned char Previous_Value;

int GetIR (void) {
unsigned char IR_Value;

IR_Value=GetDigitalInput(IR_1)+(GetDigitalInput(IR _2)*2)+(GetDigitalInput(IR_3)*3)+(GetDigitalInput( IR_4)*4);
if(IR_Value>0) {
Time=0;
Previous_Value = IR_Value;
return IR_Value;
} else if(Time>250) {
Time = 0;
Previous_Value = 0;
return 0;
}else if(IR_Value==0) {
++Time;
return Previous_Value;
}
}