First timer asking question in this forum:
I recently savaged an old Ir receiver ( 3 pin ) from an old circuit, I tried using it to decode my CTC( my TV company name ) remote, but when I use IRremote library version 3.6.1 and the new updated code, it just spits out a bunch of HEX codes even without pressing any button on my remote and when I press a button it spits out even more different HEX codes for the same button no matter how much I press the same button I never get the same result.. please help.
Am using my tablet with Arduinodroid.
Here is the code I used
#include <IRremote.h>
int RECV_PIN = 11; // define input pin on Arduino
IRrecv irrecv(RECV_PIN);
decode_results results; // decode_results class is defined in IRremote.h
void setup() {
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
delay (100); // small delay to prevent reading errors to
}
Wel. Hummm. Perhaps the issue is with your code? You think? Now how is someone supposed to help you with your code?
Oh, I know!!! If you posted your code, the someone can read your code and evaluate your code and say hey hey this is wrong or that is wrong. But without your code I can only guess. I'm guessing that your code has one serial speed selected and your serial monitor has another baud rate selected. Now that's just a guess.
If that is not the case, check you code on line 3277.
Sorry Walker I got lazy writing the code here since I used my tablet and now am using my phone but here is the code hope it helps.
#include <IRremote.h>
int RECV_PIN = 11; // define input pin on Arduino
IRrecv irrecv(RECV_PIN);
decode_results results; // decode_results class is defined in IRremote.h
void setup() {
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
delay (100); // small delay to prevent reading errors to
}
What is the serial monitor set at?
code looks a lot better in code tags. edit your post and use code tags around your code. Please.
Add this
void loop() {
Serial.println("qwertypoiu");
if (irrecv.decode(&results)) {
to your code, does "qwertypoiu" print?
Then the issue is with the data being received. Have you confirmed the data is being properly transmitted?
Now it's time to look at your hardware. Please post a wiring diagram, and since the part is unknown, a close up photo of it, as you have wired it.
Yes when I press the remote it reacts by spitting out several HEX codes( 10 plus ),
Which are totally different
Hold on I will rearrange the circuit and send you a picture
If you rearrange anything, please test it again before posting.
And these HEX code you got a spec on them or are they just being randomly produced by the transmitter?
Are you trying to figure out, hack, an unknown IR emitter?
I should mention I am using waziup but it has been working fine so far
Uploading: image9 (1).png...
If the emitter is just emitting, then printing out random received values will be normal.
If the emitter has start and stop bits then synchronizing the sender to the receiver is possible. Without knowing the start and stop thingies, expect, as normal operations, randomly produced data.
You want to mean the problem might be my remote?
I doubt that. However if you haven't ever tested it with a known good receiver, it's possible. If the receiver is actively decoding when the remote is not pressed, then the problem is definitely not the remote. Do you have any other remote to try?
No. I mean the problem might be not knowing the format the remote transmits. Not knowing the transmission format then figuring out how to decode the incoming data could be problematic.
I only have one remote but I will try to borrow from one of my friends.
I really appreciate you trying to help.
I will try a different remote which has been already decoded and let you know .Thanks for taking your precious time to helping me find solutions to my problem.