I changed the transmitter sketch so that the transmit signal is continuously ON.
#define rfTransmitPin 4 //RF Transmitter pin = digital pin 4
#define ledPin 13 //Onboard LED = digital pin 13
void setup()
{
pinMode(rfTransmitPin, OUTPUT);
pinMode(ledPin, OUTPUT);
}
void loop()
{
for ( ;; )
{
digitalWrite(rfTransmitPin, HIGH); //Transmit a HIGH signal
digitalWrite(ledPin, HIGH); //Turn the LED on
}
}
The serial monitor for the receiver sketch is showing the received signal occasionally going LOW.
Screenshot is attached.
"On" is not possible. Only a protocol with pulses (for example manchester protocol) can be used. The VirtualWire/RadioHead is by far the best library for those.
The "On" is not possible, because they are used with on/off modulation. It is about the modulation. The receiver has auto gain.
And they always need an antenna. Any piece of wire is better than nothing.
Koepel:
"On" is not possible. Only a protocol with pulses (for example manchester protocol) can be used. The VirtualWire/RadioHead is by far the best library for those.
The "On" is not possible, because they are used with on/off modulation. It is about the modulation. The receiver has auto gain.
And they always need an antenna. Any piece of wire is better than nothing.
I have switched to using VirtualWire.
And I am still confused how these are suppose to work.
Chapter 14 of the Arduino Workshop has D8 of Arduino ---> Data of TX module
D2 and D3 of Arduino are normally at ground except when switches S1 and S2 are closed. Then D2 and D3 charge to VCC via parallel RC circuit.
The sketch in chapter #47 is not very nice, and using the inverted ptt pin is only needed for less than 1% of the transmitter modules.
Try a clock rate of 2000 for both the transmitter and receiver. The 2000 Hz is an optimum for the hardware, the software and the radio signal.
vw_setup(2000);
Ask what you don't understand.
The online book cut off at page 218.
It is working now.
I was running at 3.3V because that is the spec on the F115 chip.
But it wasn't working.
Then switched over to 5V. Then it worked.
Then switched back to 3.3V and it is still working.
Chalk it down to operator error somewhere.
I will modify the sketch to use 2000 Hz instead of 300.
And I have connected D2 and D3 to the junctures of the switch, resistor, and capacitor.