Using Arduino NANO and NRF24L01 with L293D to command 2 motors

i’m working to Controlled 2 motors with Arduino NANO by wireless connected through NRF24L01

i’m using L293D to control the Direction but i have many problems in “RX code” and “TX code”

i need to helps me please

http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo

RX code:

#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
#include <SPI.h>
RF24 radio(9, 10);
const uint64_t pipes[2] = {0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
char command;
// map motor poles to Arduino pins
#define IN1 3 // Front Motor Pins
#define IN2 5 // Front Motor Pins
#define IN3 9 // Rear Motor Pins
#define IN4 11 // Rear Motor Pins
#define EN1 2 // enable pin of L293D is connected to digital pin 2
#define EN2 4 // enable pin of L293D is connected to digital pin 4

void setup() {
// put your setup code here, to run once:
Serial.begin(9600); // pour le débogage
Serial.println("En attente de commande ");

// set mapped motor poles to Arduino pins (via L293D)
pinMode(EN1,OUTPUT); // All control pins of the motor ae defined as Output.
pinMode(EN2,OUTPUT);
pinMode(IN1,OUTPUT);
pinMode(IN2,OUTPUT);
pinMode(IN3,OUTPUT);
pinMode(IN4,OUTPUT);

radio.setRetries(15, 15);
radio.openReadingPipe(1,pipes[1]);
radio.startListening();
radio.printDetails();
radio.openWritingPipe(pipes[1]);
radio.openReadingPipe(2,pipes[2]);
radio.stopListening();
radio.begin();
}

void loop() {
// put your main code here, to run repeatedly:
while (radio.available())
{

radio.read(&command, sizeof(command));
Serial.println(command);

if( command == ‘w’) // If Received ‘w’ then Call Forward Function
{
Forward();
}
if(command == ‘x’) // If Received ‘x’ then Call Reverse Function
{
Reverse();
}
if( command = ‘a’) // If Received ‘a’ then Call Left Function
{
Left_Turn();
}
if (command = ‘d’) // If Received ‘d’ then Call Right Function
{
Right_Turn();
}
if (command = ‘s’) // If Received ‘d’ then Call Right Function
{
Stop();
}

}
}

void Forward() // Move Forward
{
digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,LOW);
digitalWrite(IN4,HIGH);
}
void Reverse() // Move Backward
{
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
digitalWrite(IN3,HIGH);
digitalWrite(IN4,LOW);
}
void Left_Turn() // Turn Left
{
digitalWrite(IN1,LOW);
digitalWrite(IN2,LOW);
digitalWrite(IN3,LOW);
digitalWrite(IN4,HIGH);
}
void Right_Turn() // Turn Right
{
digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,LOW);
digitalWrite(IN4,LOW);
}
void Stop()
{
digitalWrite(IN1,LOW);
digitalWrite(IN2,LOW);
digitalWrite(IN3,LOW);
digitalWrite(IN4,LOW);
}

TX code:

#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
#include <SPI.h>

#define FWD_buttonPin 13 // Farward Button
#define REVS_buttonPin 12 // Reverse Button
#define LEFT_buttonPin 7 // Left Button
#define RIGHT_buttonPin 6 // Right Button

RF24 radio(9,10);
const uint64_t pipes[2] = {0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

char byteRead;
//char command;

void setup(void)
{
pinMode(FWD_buttonPin,INPUT); // Enable Buttons
pinMode(REVS_buttonPin,INPUT); // Enable Buttons
pinMode(LEFT_buttonPin,INPUT); // Enable Buttons
pinMode(RIGHT_buttonPin,INPUT); // Enable Buttons

Serial.begin(9600);
radio.begin();
}
void loop(void)
{
if(digitalRead(FWD_buttonPin) == 1) // IF Front Button is Pressed - “w” is sent to Receiver
{
Serial.println(“Front”);
byteRead = ‘w’;
radio.write(&byteRead,sizeof(&byteRead));
}
if(digitalRead(REVS_buttonPin) == 1) // IF Back Button is Pressed - “x” is sent to Receiver
{
Serial.println(“Back”);
byteRead = ‘x’;
radio.write(&byteRead,sizeof(&byteRead));
}

if(digitalRead(LEFT_buttonPin) == 1) // IF Left Button is Pressed - “a” is sent to Receiver
{
Serial.println(“LeftTurn”);
byteRead = ‘a’;
radio.write(&byteRead,sizeof(&byteRead));

}

if(digitalRead(RIGHT_buttonPin) == 1) // IF Right Button is Pressed - “d” is sent to Receiver
{
Serial.println(“RightTurn”);
byteRead = ‘d’;
radio.write(&byteRead,sizeof(&byteRead));
}
}

they didn’t work i don’t know why please help me …