I have an Arduino Uno and im trying to read the input from a IR remote(car mp3) through a vs1838 receiver, but when i open the serial monitor i only get 0's from all keys.
I tried different remotes, all with the same result. Is it possible that controller and receiver are incompatible?
This is the code:
const int RECV_PIN = 7;
Sorry for any mistakes, english is not my main language.
Confirm that the remote is actually sending. Most cell phone cameras are sensitive to IR. Point your remote at the camera and watch for the blue light flashing when you press buttons on the remote.
Do you know if the decoder frequency and the remote frequency match?
What version of the IRRemote library are you using? There are significant changes in the newer library. The latest version of the library is not compatible with old code. Use the examples from the new library.
If you are using the newest version of IRRemote library, try this example code:
const byte IR_RECEIVE_PIN = 7;
Serial.println("IR receive test");
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);//pin 13 LED flashes with IR input
unsigned long keycode = IrReceiver.decodedIRData.command;
if ((IrReceiver.decodedIRData.flags & IRDATA_FLAGS_IS_REPEAT)) // ignore repeat code
Thank you, groundFungus, that worked first try changing changing the bauds of the monitor.im gonna have to learn more about this librery and practice C++ because and dont fully understand that piece of code, but thanks again.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.