|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.
![]() 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! ![]() |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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! |
|
#4
|
||||
|
||||
|
Re: Connecting IR Board
|
|
#5
|
|||
|
|||
|
Re: Connecting IR Board
Thanks, I'll look into that when I get to a computer with faster internet...
![]() |
|
#6
|
||||
|
||||
|
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;
}
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| connecting sensors | guy_rom | Electrical | 4 | 01-02-2008 13:21 |
| Connecting LCD module to RC | David55 | Electrical | 5 | 13-07-2006 22:09 |
| Lights in Joystick board or control board | rcubes85 | Control System | 15 | 26-02-2005 23:40 |
| Connecting Switch to RC | Mr. Steve | Control System | 2 | 28-01-2005 22:37 |
| Perf Board = BS2-IC Carrier Board? | indieFan | Electrical | 2 | 16-09-2004 08:28 |