problem on receiver programming

Below is my transmitter programming which it able to send ' 8 ' to the serial port
int crankingPin = 3;
int liftoffPin = 4;
int upwardPin = 5;
int downwardPin = 6;
int turnleftPin = 7;
int turnrightPin = 8;
int forwardPin = 9;
int backwardPin = 10;
int buttonstate;

void setup()
{
// initialize the serial communication:
Serial.begin(9600);

// initialize the ledPin as an output:

pinMode(crankingPin, INPUT);
pinMode(liftoffPin, INPUT);
pinMode(upwardPin, INPUT);
pinMode(downwardPin, INPUT);
pinMode(turnleftPin, INPUT);
pinMode(turnrightPin, INPUT);
pinMode(forwardPin, INPUT);
pinMode(backwardPin, INPUT);
}

void loop()
{
if(digitalRead(crankingPin)==HIGH)
{
Serial.write('8');
delay(1000);
}

}

Hence for receiver programing which planning to use 2 arduino which 1 arduino for the transmitter and other 1 for receiver. So how receiver the 8 , and after i receive , i would like to do some routine such make the led turn on at certain brigthness. below is my receiver code

int incomingbin;
int motor1 = 5;
int motor2 = 6;
int motor3 = 9;

void setup()
{
// initialize the serial communication:
Serial.begin(9600);
// initialize the ledPin as an output:

pinMode(motor1, OUTPUT);
pinMode(motor2, OUTPUT);
pinMode(motor3, OUTPUT);
}

void loop()
{
while(Serial.available())
{
incomingbin = Serial.available();
delay(1000);
}

if(incomingbin == 8);
{
analogWrite(motor1, 40);
analogWrite(motor2, 40);

}
}

the receiver code didnt work out as i want to be. So hope member able to rectifier my problem or teach me how could this progrmaming..Thank you

incomingbin = Serial.available();

Would probably work better if you set incomingbin to the value returned by Serial.read().

i would like to do some routine such make the led turn on at certain brigthness.

   if(incomingbin == 8);
      {
        analogWrite(motor1, 40);

You have an LED connected to a pin named motor1? You ARE strange. :stuck_out_tongue:

Sorry.actually i m using led as a test load before using the motor. If led able to be control then the motor also able to be control. For led just need resistor but for motor need the drive system.