I am working on a science project with my friend and our idea is to create circuits so that when the receiver and transmitter come close enough together it lights a warning LED. We have found code for both the receiver and transmitter that transmits a message saying WARNING! which can be seen in the serial monitor of the computer that the receiving circuit is plugged into. Our goal is to have an LED light when a signal is received, but we have almost no experience in coding meaning we have almost no clue what we are doing We preferably want to not have to use the serial monitor and have the circuits able to work when powered independently using a 9v battery, not needing to be plugged into a computer. We just need to know how to wire the LED into the receiving circuit and how to edit the code to make the LED light every time it receives a signal. I have attached both the receiver and transmitter sketches.
Transmitter_Sketch.ino (422 Bytes)
receiver_sketch.ino (687 Bytes)