Hi everyone, Im quite newbie in arduino, I can write some simple codes, but this one I cant figure out, google is not helping. sory about my english
Im using RF module for sensor, and cant make it work. I was trying to use simple button code, and upgrade it by adding lines for VirtualWire library.
Heres the code (I make it the simplest posibble to find problem):
#include <VirtualWire.h>
char *controller;
int buttonState = 0;
void setup() {
 pinMode(13, OUTPUT);
 pinMode(11, INPUT);
 vw_set_ptt_inverted(true); //
 vw_setup(1000);
 vw_set_tx_pin(12);
}
void loop() {
 if (digitalRead(11) == HIGH) {
  digitalWrite(13, HIGH);
 } else {
  digitalWrite(13, LOW);
 }
}
when I add vw_setup(1000) as first line in setup, pin input 11 stop working at all. When I put this line after setup pin mode, LED on pin 13 is always on.
why vw_setup(1000) is affecting pin input/output? and why change position of this line change behavior of the pins? i thought order in setup doesnt matter... thanks for advices!