I ordered some IR transmitter and receivers. There is one black thing and one whit thing. How do i figure out which is the IR transmitter and which is the receiver?
:-[
Im fairly positive that the clear one is the transmitter, while the black one is the reciever. A neat trick to check if your transmitter is working is to look at it through your cell phone camera. You should see a purple glow on your screen when your transmitter is producing IR light.
Guess what... both of them are producing the purple glow. I suspect both could be transmitters. doesnt the receiver have a black chip like thing in the center?
Hmmm. Im not sure why the receiver would be producing IR light, but from my experience, which isn't a whole lot, the clear transmitter is shaped sort of like an led, and the reciever is usually a black rectangular shaped thing. The reason the reciever is black is so that it filters out the visible light.
Do you have any info on the pair? Where did you order them from etc.
I just got a package of IR emitter/detector from Radio Shack recently. In that case the clear one was the receiver, and the tinted one was the transmitter.
There's a great playground page that gives you a basic IR decoder. Might just need to test both of them.
Thanks! Might Need to test it.
I do not know what the parts you have in your hand look like, but the Transmitter is normaly a "LED" with 2 "legs" and on the "receiver" you can expect 3 legs: 2 for power and 1 for output signal.
Peter.
So I'm trying to do this ... if anyone has a clue what I'm doing wrong ... I would be forever great full ..
int ledPin = 13;
int incomingInt = 0;
int OnesData = 0;
int TensData = 0;
int HunsData = 0;
int ThosData = 0;
int TThoData = 0;
void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
TThoData = Serial.read();
TThoData = TThoData * 10000;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
ThosData = Serial.read();
ThosData = ThosData * 1000;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
HunsData = Serial.read();
HunsData = HunsData * 100;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
TensData = Serial.read();
TensData = TensData * 10;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
OnesData = Serial.read();
incomingInt = OnesData + TensData + HunsData + ThosData + TThoData;
Serial.println(incomingInt);
int OnTimes[incomingInt+1];
int OffTimes[incomingInt+1];
for (int count=0; count <= incomingInt; count++)
{
TThoData = 0;
ThosData = 0;
HunsData = 0;
TensData = 0;
OnesData = 0;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
TThoData = Serial.read();
TThoData = TThoData * 10000;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
ThosData = Serial.read();
ThosData = ThosData * 1000;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
HunsData = Serial.read();
HunsData = HunsData * 100;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
TensData = Serial.read();
TensData = TensData * 10;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
OnesData = Serial.read();
OnTimes[count] = OnesData + TensData + HunsData + ThosData + TThoData;
TThoData = 0;
ThosData = 0;
HunsData = 0;
TensData = 0;
OnesData = 0;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
TThoData = Serial.read();
TThoData = TThoData * 10000;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
ThosData = Serial.read();
ThosData = ThosData * 1000;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
HunsData = Serial.read();
HunsData = HunsData * 100;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
TensData = Serial.read();
TensData = TensData * 10;
while (Serial.available() <= 0)
{
// Wait For A Pair Burst
}
OnesData = Serial.read();
OffTimes[count] = OnesData + TensData + HunsData + ThosData + TThoData;
}
// Arrays are now full of On/Off Times
for (int count1=0; count1 <= incomingInt; count1++)
{
//Serial.println(OnTimes[count1]);
//Serial.println(OffTimes[count1]);
digitalWrite(ledPin, HIGH);
delayMicroseconds(OnTimes[count1]);
digitalWrite(ledPin, LOW);
delayMicroseconds(OffTimes[count1]);
}
}
I have a VB Program that sends the Timing to the Arduino ... Here is an example of what I send
Dim t(5) As Byte
t(0) = 0
t(1) = 0
t(2) = 0
t(3) = 1
t(4) = 7
SP.Write(t, 0, 5) 'Number Of Burst Pairs
t(0) = 0
t(1) = 8
t(2) = 9
t(3) = 1
t(4) = 8
SP.Write(t, 0, 5) 'Lead In On Time
t(0) = 0
t(1) = 4
t(2) = 4
t(3) = 9
t(4) = 8
SP.Write(t, 0, 5) 'Lead In Off Time
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 1 On Time
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5) 'Pair 1 Off Time
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 2
t(0) = 0
t(1) = 4
t(2) = 4
t(3) = 9
t(4) = 8
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 3
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 4
t(0) = 0
t(1) = 4
t(2) = 4
t(3) = 9
t(4) = 8
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 5
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 6
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 7
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 8
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 9
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 10
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 11
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 12
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 13
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 15
t(0) = 0
t(1) = 4
t(2) = 4
t(3) = 9
t(4) = 8
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 16
t(0) = 0
t(1) = 4
t(2) = 4
t(3) = 9
t(4) = 8
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 17
t(0) = 0
t(1) = 2
t(2) = 2
t(3) = 3
t(4) = 6
SP.Write(t, 0, 5)
t(0) = 0
t(1) = 0
t(2) = 4
t(3) = 6
t(4) = 8
SP.Write(t, 0, 5) 'Pair 18
t(0) = 0
t(1) = 2 '2
t(2) = 2 '2
t(3) = 3 '3
t(4) = 6 '6
SP.Write(t, 0, 5)
I downloaded this HEX code from remote central
0000 006D 0012 0002 0157 00AD 0012 0056 0012 00AD 0012 0056 0012 00AD 0012 0056 0012 0056 0012 0056 0012 0056 0012 0056 0012 0056 0012 0056 0012 0056 0012 0056 0012 00AD 0012 00AD 0012 0056 0012 04F5 0157 0056 0012 0D2F
From there I converted it to timing for the arduino ... If anyone knows that are too ...
I ignored the 1st word ... the 2nd word is the clock ... convert it to decimal in this case 109 ... then do this 1000000 / (109 * .241246) ... which gave me 38 KHZ ... then do this 1/38028 * 1000000 which tells me that 1 cycle takes 26 microseconds ...
help PLEASE
Hi Anthony,
I am not sure what you are trying to do here but you code will not do much. All it does is wait for a byte to arrive on the serial port and then multiply that byte by 10,000. That's the first bit I couldn't follow it after that.
How have you got your hardware connected up?
Are you expecting asynchronous data to come in from the serial port?
What has this to do with IR?
I downloaded this HEX code from remote central
Is this code compatible with this processor, if so what is it supposed to do?
Without an idea of what you are trying to do and what setup you have we don't stand a chance of helping you.
I'm trying to get the Arduino to turn on my cable box ... Thats the Hex IR Code to turn it on ... I have a pronto (universal remote) ... I just want to flash the IR LED (on in 13) to make that happen ... I have my computer plugged in USB to the board ... and I want to send the timing to the board ... once the board has all the correct timing ... I want it to flash the led at those speeds ...
I just want to flash the IR LED (on in 13) to make that happen
No you will need an IR LED to make it happen, the viable LED will blink so fast that it will look like it is on all the time.
Thats the Hex IR Code to turn it on
Still not sure what this is, is it a list of flashing timings, if so it would be called data not code.
Do you know the frequency of modulation for your remote? You need to flash the LED at this rate and then on top of that turn the flashing LED on and off quickly.
Have a look at these links:-
http://www.arduino.cc/playground/Code/InfraredReceivers
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232316708/7