Hi everyone. I have been trying to use 433 mHZ transmitter and receiver module with my Arduino Uno.
I have only one Arduino, that’s why I don’t have any chance except using interrupts.
I want to light my led when I push the button through RF Receiver and Transmitter.
you are not really helping us help you when you say "it didn't work". It would be helpful to know what symptoms you have. Are you getting Errors? Does it seem to transmit but not receive or vice versa?
Generally speaking, you Need to determine what is working in order to determine what isn't. For example, if you add an LED and put code in the transmit function, does the LED ever go on? If not, the functin isn't being called and that Points you in one direction. If the LED does light, it Points you in another.
Also, tx and rx usually indicate Serial Transmission. Serial Transmission is a timed sequence and usually relies on Interrupts itself to do the Timing. Therefore, usually Serial Transmission can't ever work within an Interrupt routine.
you don't need two arduinos, just manually set the Transmit to HIGH and use the code they have in step 1 for the arduino.
You'll see you don't need any interrupt or complex set up. When you read analog(A0) you need to experiment a bit to set a high and low threshold that makes sense for your hardware. when the A0 pin gets above the high threshold, you can consider the button is pressed, when it goes below the low you can consider the button has been released