433Mhz long range transmitter question

I have been working on controlling a led over rf, i started off using a very simple short range transmitter and receiver with arduino uno, now i am trying to use a Seeedstudio 433MHz RF Long Distance Transmitter here but i cant figure it out. this is the code i am using with the short range pair. (i am using VirtualWire). i was thinking/hoping i would be able to use this code with the long range transmitter and receiver.

TX
/*
SimpleSend
This sketch transmits a short text message using the VirtualWire library
connect the Transmitter data pin to Arduino pin 12
*/
#include <VirtualWire.h>
const int BP = 2; //buttonPin

int BS = 0;

void setup()
{
// Initialize the IO and ISR
vw_setup(5000); // Bits per sec
pinMode(BP, INPUT);
Serial.begin(9600);
}

void loop()



{
 send("I");
 delay(1200);
 //send("O");
 //delay(500);
 
 BS = digitalRead(BP);
 if (BS == HIGH){
   send("H");
   send("S");
   delay(10);
   
   Serial.print("on");
 }else {
  send("L");
  send("S");
   delay(10);
    Serial.print("off"); 
 }

}
void send (char *message)
{
vw_send((uint8_t *)message, strlen(message));
vw_wait_tx(); // Wait until the whole message is gone
}



RX

/*
RF tally, RX code.
*/
#include <VirtualWire.h>
byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages
byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message
int LEDPin = 4;
int PIN = 11;
int SIGPin = 5;
int incomingByte;
void setup()
{
Serial.begin(9600);
Serial.println("Device is ready");
// Initialize the IO and ISR
vw_setup(5000); // Bits per sec
vw_rx_start(); // Start the receiver
pinMode(LEDPin, OUTPUT);
pinMode(SIGPin, OUTPUT);
//digitalWrite(LEDPin, LOW);


}
void loop()


{
if (vw_get_message(message, &messageLength)) // Non-blocking
{
 
Serial.print("Received: ");
for (int i = 0; i < messageLength; i++)
{
Serial.print(message[i]);

pinMode(PIN, INPUT);
int RFin = (message[i]);
int H = 72;
int L = 76;
if(RFin == 83) {
 digitalWrite(SIGPin, HIGH);
}

else if(RFin == 73) {
 digitalWrite(SIGPin, LOW);
}
Serial.print(RFin); //read RFin

if(RFin == 72) {  //  motor on command
 digitalWrite(LEDPin, HIGH);
 
}

else if(RFin == 76)
{
 digitalWrite(LEDPin, LOW);
 
 
 
 
}
}


}


}

Please edit your post and add code tags ("</>" button).

The most important thing you can do to improve reception range is have a proper antenna on both transmitter and receiver. This should be a balanced dipole, about 33 cm from tip to tip, with one terminal connected to ANT and the other connected to GND on each module, as shown. I get 300 meters range, line of site, with the very cheapest modules.

I appreciate the reply, that answered a few of my questions on my short range pair. But my real question is how to use the long range seed studio pair. I need to solder some pins on both the TX and RX but Im not sure which pins are soldered to high and low.

For the proper connections, see the customer comments on the product page of that terribly overpriced, ripoff set.

It is NOT VirtualWire compatible. It has its own PT2262/2272 encoder/decoder, just like these: Keyfob 4-Button RF Remote Control - 315MHz : ID 1095 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Also, you won't get more than about 300 meters range under the best of conditions.

That is good to know. Well im open to recomendations on a rf transmitter and reciver that can get me up to 1 kilometer, and something that would work with virtual wire. And as small as possible. It would just be for a simple on off switch. Thanks!

Why do you need to use virtualwire if all you want is a simple on / off switch.
You can do that with the radios you have with no need to use an Arduino at all.

This seller has 433MHz boards with power output up to 1W. With Yagi antennas at each end, you should not have a problem. If the data is going one way then a lower power unit with a decent receiver at one end is sufficient.

Why do you need to use virtualwire if all you want is a simple on / off switch.
You can do that with the radios you have with no need to use an Arduino at all.

i need to control it through a arduino, it really is just to turn a led on and off but the final product is not just a push button or a switch. i don't really need to use virtualwire but i already have code that is ready to go so it would make things easier.

This seller has 433MHz boards with power output up to 1W. With Yagi antennas at each end, you should not have a problem. If the data is going one way then a lower power unit with a decent receiver at one end is sufficient.

Thank you!