Sychronization in virtuel wire

So you got me wondering if I just got lucky with my RF remote control then:

I am using pin 10 as Slave Select with SPI to a MAX7221, I only made these statements for the receiver:

  // Initialise the Wireless Receiver IO and ISR
  // set Virtual Wire data input to Pin 9 from 11
  vw_set_rx_pin(9);  // found this in forum 25 Aug 09
  // set the Bits per sec 
  vw_setup(2000);
  // Start the receive PLL running
  vw_rx_start();

and only this for the transmitter, with D10 being used as a Column pin for a keypad, and D11/D13 not used.

 // Initialise the IO and ISR for VirtualWire
  vw_setup(4000);	                      // Bits per sec - had to double from 2000 with 8MHz 3.3V Pro-Mini

with D10 being used as a Column pin for a keypad, and D11/D13 not used.

As long as you don't try to read from the keypad while transmitting, you can get away with this. But, how can D11 to D13 not be used, if you are

with SPI to a MAX7221,

SPI uses 11 to 13, with 10 as the default slave select for many libraries.

Only the reciever used SPI, hence the reassignment.
Didn't use any library, wrote my own MAX7221 code. Pretty simple, just SPI.transfers.

On the transmitter, code gets interrupted, reads the keypad, transmits. SPI not used, so no Rx/TX pin reassignment.

Hi all,

Sorry for late reply.

I never defined pin 10 through any library,so virtual wire may be using it by default.

I am shifting the ptt pin to 15,which is undefined for uno.

I will update soon.

"I am shifting the ptt pin to 15,which is undefined for uno."
15 is not undefined - it is the same as A1 (A0-A5 = D14-D19).
If you want undefined, I would go for >=20.

Dear cross roads,

forgive me if its blunder...

Does it mean I can use the A0-A5 pins just like the others ?

functions like digital write,analog write etc can too be done there ???

functions like digital write,analog write etc can too be done there ???

digitalWrite() - yes.
analogWrite() - no - none of the analog as digital pins are PWM pins.
pinMode() - yes.

Hey myfaithnka can you post your fixed transmitter and receiver code after you fixed your synchronization problem. I am trying to send integer values from two sensors and I am having the same problem you had with the mixed up values, but I can't figure out what is wrong. Thanks in advance.