Hi,
I was learning <VirtualWire.h> library.I came across this functions
1. vw_set_ptt_pin
extern void vw_set_ptt_pin(uint8_t pin);
Set the digital IO pin to use to enable the transmitter (press to talk). Defaults to 10. Not
all transmitters require PTT. The DR3100 does, but the TX-B1 does not.
2. vw_set_ptt_inverted
extern void vw_set_ptt_inverted(uint8_t inverted);
By default the PTT pin goes high when the transmitter is enabled. This flag forces it low
when the transmitter is enabled. Required for the DR3100.
ya, but vw_set_ptt_pin is recq for every transmitter.
i want to know how to connect the ptt pin to the circuit
(assuming the ptt pin is arduino dogotal pin 7)
You can delete both of these in your Virtual wire code.
Your transmitter does not have a push to talk pin, since it is not there you don't need to assign or invert it.
Virtualwire sends some byte as part of the data being sent to wake up the transmitter and help the receiver recognize the signal and start decoding it.
That's part of what limits the data rate you can select to around 2000 tops.
All you need to do is connect pin 11 or 12 (I forget which is default for Rx & TX) to the data pins on the devices, or whatever pin you may have reassigned those to.
1. vw_set_ptt_pin
extern void vw_set_ptt_pin(uint8_t pin);
Set the digital IO pin to use to enable the transmitter (press to talk). Defaults to 10. Not
all transmitters require PTT. The DR3100 does, but the TX-B1 does not.
2. vw_set_ptt_inverted
extern void vw_set_ptt_inverted(uint8_t inverted);
By default the PTT pin goes high when the transmitter is enabled. This flag forces it low
when the transmitter is enabled. Required for the DR3100.