Pages: [1]   Go Down
Author Topic: IR-receiver receives "garbage"  (Read 737 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've got a problem here. I have tried to get my IR-receiver working.  i have the sensor and remote control. I used the code

Code:
#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
  pinMode(3, OUTPUT);
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results))
  {
    Serial.println(results.value, HEX);
    delay(100);
    irrecv.resume(); // Receive the next value   
  }
  if(results.value == 0xFF30CF)
  {
    digitalWrite(3, HIGH);
  }
  else if (results.value == 0xFFA25D)
  {
    digitalWrite(3, LOW);
  }
}

Code works great except the thing that after every few second there is three garbage-values that my IR-sensor reads. And when they are displayed none of my inputs are received. When i press button after the three values have shown it works great! I don't understand what are those three codes

3C573D9C
43B23900
6860065

it gives something like these in every few seconds. And they are diffrent every time!

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay! I managed to pinpoint my problem, but i dont get it smiley-grin. Whenever i turn on my TV the garbage stops and program works perfectly. After i shut it down it starts again! How this is possible? I went to my bedroom with arduino and the garbage was still there but after i turn on TV it stops again.  smiley-surprise
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, that sounds pretty 'X-files'! smiley-wink

Is it an old fashion tv or a flatscreen?
Remote controls make use of IR leds (usually around 950nm, don't know what you're detector is like) so it can't really be from the tv since it only uses a reciever (detector)... Do you have any consoles conected to you tv? (Wii, other stuff that might use IR radiation as remote control?)

Although it sounds pretty darn weird that you encounter the same phenomenon in a room without tv (doors closed?)
How many times have you tried this? (all experimentation should be statistically evaluated smiley-wink )
Logged

Pages: [1]   Go Up
Jump to: