Okay, so I have been working on this project for a long time and cannot for the life of me figure out how to solve my problem.
Basically, I have a 433 mHz receiver and an RF remote. All I want to accomplish is to turn on an LED while I'm holding down a certain button, and when I release the button, I want the LED to turn off again. I am using the RC Switch library. I have already decoded all of the buttons. Has anyone done this before? Essentially I want to code the buttons on the remote like momentary buttons. Any help would be GREATLY appreciated!
I should have asked you to post the code you have so far, too.
You probably have the code in a variable like theCode or something, in which case you could probably do something like this in loop(), and assuming the code XXX is sent continuously as the button is held:
My code really wouldn't help much. And the signal isnt continous. There's about a 400 ms delay between each pulse. I tried doing an if/else statement, but once it signal is received, it turns the light on, but when I release it leaves it on until I press another button. I don't think I can use no signal from the remote as a condition, which makes things a little bit more complicated. I have a few EE friends and they couldn't figure it out either.