Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Connecting IR Board (http://www.chiefdelphi.com/forums/showthread.php?t=64415)

Gizmo2417 17-02-2008 22:15

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

usbcd36 17-02-2008 22:41

Re: Connecting IR Board
 
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.

Gizmo2417 18-02-2008 00:06

Re: Connecting IR Board
 
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

Re: Connecting IR Board
 
This might be helpful

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

Gizmo2417 18-02-2008 00:54

Re: Connecting IR Board
 
Thanks, I'll look into that when I get to a computer with faster internet... :rolleyes:

Stvn 18-02-2008 01:58

Re: Connecting IR Board
 
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):
Code:

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;
        }
}



All times are GMT -5. The time now is 19:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi