Connecting IR Board

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! :smiley:

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. 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.

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!

This might be helpful

Thanks, I’ll look into that when I get to a computer with faster internet… :rolleyes:

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;

	if(IR_Value>0) {
		Previous_Value = IR_Value;
		return IR_Value;
	} else if(Time>250) {
		Time = 0;
		Previous_Value = 0;
		return 0;
	}else if(IR_Value==0) {
		return Previous_Value;