Im using the Virtualwire library for RF com, but its has preset pin defaults which i want to change. how can i change these?
RTFM?
4.1 vw_set_tx_pin
extern void vw_set_tx_pin(uint8_t pin);
Set the digital IO pin to use for transmit data. Defaults to 12.
4.2 vw_set_rx_pin
extern void vw_set_rx_pin(uint8_t pin);
Set the digital IO pin to use for receive data. Defaults to 11.
4.3 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.
4.4 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.
yes these are the tags but could please make it a bit easier for me? how can i change these?
adilmalik:
yes these are the tags but could please make it a bit easier for me? how can i change these?
You call the function and pass it the pin that you want to use.
As in:
vw_set_tx_pin = 6; // example
??
adilmalik:
As in:vw_set_tx_pin = 6; // example
??
vw_set_tx_pin isn't a variable, it's a function.
So how can i assign a new pin to this?
If you're not even going to try to learn, I'm not going to try and help.
Google: vw_set_tx_pin
Read some of the posts. There are examples and stuff.