I recently used my IR remote + receiver module for the first time in a fairly large project of mine. It was easy to set up and use - there were no problems. I switched to an IR receiver I pulled off of an old PCB so I didn't use the other one up. It also worked with no problem.
All of a sudden, however, it just stopped working. I had a relay connected to the power button of the remote (when you clicked the button the relay would latch on/off) and one day it just stopped flicking the relay.
I hadn't changed any code or wiring - it just stopped working. The first thing I did was serial print the value. Instead of getting this:
Now, clearly, something is wrong here. How can the value be so different each time? (It happens with all buttons on the remote)
I started by changing the remote I was using - still had the same problem.
I then changed back to the old receiver - still the problem.
I switched digital pins - no change, still problematic.
I had recently added in some code which I had clashing problems with - FastLED - (it affected the relay and made it freak out). Even though I thought that was the only problem I still went ahead and removed the code. It made no difference.
I did some research on it and a lot of answers were saying something about the frequencies not matching. If this is the case, why did it work perfectly for so long in the beginning?
What is happening here and how can I fix it?
Thanks,
Dream
Unfortunately, I cant replace it. I don't have the batteries - it uses a 2025 and I only have 2023's.
I don't see why I need to replace it. I haven't even used it for a total of 1 day.
I thought you were posting because your remote wasn't working any more.
Just how do you think batteries work ?
Do you think that because it worked yesterday that the battery cannot run out between yesterday and today ? How does that work ?
Did you at least measure the voltage on the battery ?
raschemmel:
I thought you were posting because your remote wasn't working any more.
Just how do you think batteries work ?
Do you think that because it worked yesterday that the battery cannot run out between yesterday and today ? How does that work ?
Did you at least measure the voltage on the battery ?
Is the voltage >3.00 Volts ?
I can see where you misunderstood. I never said my remote stopped working - it almost seems that the decoder in the IR library is not working. I could be wrong - that's why I wanted help. Why are the values so random?
I did try with a different remote, but as I said, it didn't work.
Ok, this is weird. I was doing some more debugging and it is working again now. The values that show up on button press are always the same now, instead of being random. The only thing that changed is the actual values: 16753245 used to be the code for the power button.
Now 23971 is the code. So it has changed. Why did it do this and will it do it again? As you can see in my code I want to have default values but if the default values are always changing then I can't use them.
EDIT: nevermind, only the power button value changed. All the others stayed the same.
So it has changed. Why did it do this and will it do it again?
Now you have corrected the mistake it should stay the same. Before with the mistake in it the code was writing over memory locations it should have not been accessing. This was causing you to see a false number.