Gesture Control Car Using MPU6050+nRF24l01 (Help me, quickly!)

i am trying to make gesture control car for my university mini project. I am using MPU6050 and nRF24l01, separately both are working, but I can't combine both and i can't control a motor according to the motion of MPU6050. please your help is highly appreciated. (i am new to Arduino)..

for transmitting side am using MPU6050 gyro and nRF24l01 transceiver with Arduno nano v3 board..
in receiver side am using nRF24l01 with arduino duemilanove compatible board and L298 H bridge(motor control).

for MPU6050 i use MPU6050 library(i2cdevlib/Arduino/MPU6050 at master · jrowberg/i2cdevlib · GitHub) and
for nRF24l01 i use Mirf library (Arduino Playground - Nrf24L01)

so i stuck with nRF24l01, because i couldn't transmit things correctly, and i can not understand how to combine MPU6050 and nRF24l01..

MPU6050_raw.ino (3.36 KB)

Specifically, what is the problem?

I may have deleted the other cross-post of this topic.

Oops.

the problem is that, i can't combine MPU6050 gyro and nRF24l01 transceiver...

What have you tried?

the problem is that, i can't combine MPU6050 gyro and nRF24l01 transceiver...

Why not? What happens when you try? Does the Arduino simply go up in smoke?

You are making it very difficult to help you.

am really sorry if i disturbs u..

in my problem i want to send the readings of MPU6050 by using nRF24l01, but i can not understand how make that cord, because i am new to arduino..
previously i have mentioned the details.. so please if you can help me to build that cord which is combined MPU6050 and nRF24l01..

Useful HowTo

in my problem i want to send the readings of MPU6050 by using nRF24l01

Yeah, yeah. We get that.

but i can not understand how make that cord

What cord? Is that supposed to be code?

because i am new to arduino..

No, it's because you saw a pool and jumped in the deep end.

Can you send ANYTHING, using ANY code, from one radio to the other?

this is a cord for transmitter,, but it cannot be compiled..

//Transmitter

/* CE - 9
   CSN - 10
   SCK - 13
   MISO - 12
   MOSI - 11
   VCC - 3.3V
   GND - GN  */

#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10

const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe

RF24 radio(CE_PIN, CSN_PIN); // Create a Radio

int mpu[2]; // this constant have two elements: x - axis and y - axis

void setup() {
Serial.begin(9600);
radio.begin(); radio.openWritingPipe(pipe);
}

void loop() {
mpu[0] = x_data; // x_data from mpu
mpu[1] = y_data; //y_data from mpu
radio.write(mpu, sizeof(mpu) );
}

this is a cord for receiver,,it also cannot be compiled..

//Receiver

/* CE - 9
   CSN - 10
   SCK - 13
   MISO - 12
   MOSI - 11
   VCC - 3.3V
   GND - GN  */
   
#include <SPI.h>
#include <RF24.h>
/*-----( Declare Constants and Pin Numbers )-----*/
#define CE_PIN   9
#define CSN_PIN 10

// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe

/*-----( Declare objects )-----*/
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/*-----( Declare Variables )-----*/
int mpu[2];  // 2 element array holding Joystick readings

void setup()   /****** SETUP: RUNS ONCE ******/
{
 Serial.begin(9600);
 delay(1000);
 Serial.println("Nrf24L01 Receiver Starting");
 radio.begin();
 radio.openReadingPipe(1,pipe);
 radio.startListening();;
}//--(end setup )---

void loop()   /****** LOOP: RUNS CONSTANTLY ******/
{
 if ( radio.available() )
 {
   // Read the data payload until we've received everything
   bool done = false;
   while (!done)
   {
     // Fetch the data payload
     done = radio.read( mpu, sizeof(mpu) );
     Serial.print("X = ");
     Serial.print(mpu[0]);
     Serial.print("  Y = ");      
     Serial.println(mpu[1]);
   }
 }
 else
 {    
     Serial.println("No radio available");
 }

}

please tell me, is that enough x and y coordination to control a car, that mean i want to move that car forward,back,left, and right..

Piyumal:
this is a cord for transmitter,, but it cannot be compiled..

Piyumal:
this is a cord for receiver,,it also cannot be compiled..

Do you have those libraries (RF24.h, SPI.h)?

i haven't that library files, how can i find that???

Piyumal:
i haven't that library files, how can i find that???

Kids, today. Send them to school, teach them to read, and then what?

http://lmgtfy.com/?q=RF24.h

http://lmgtfy.com/?q=SPI.h

thank you very much,, i used that libraries,, cord for receiver is ok,, but cord for transmitter was not compiled.. here that code, what is the mistake that i have done???
error msg is

Arduino: 1.5.6-r2 (Windows 8), Board: "Arduino Nano, ATmega328"

Build options changed, rebuilding all

TX.ino: In function 'void loop()':
TX:27: error: 'x_data' was not declared in this scope
TX:28: error: 'y_data' was not declared in this scope

//Transmitter

/* CE - 9
   CSN - 10
   SCK - 13
   MISO - 12
   MOSI - 11
   VCC - 3.3V
   GND - GN  */

#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10

const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe

RF24 radio(CE_PIN, CSN_PIN); // Create a Radio

int mpu[2]; // this constant have two elements: x - axis and y - axis

void setup() {
Serial.begin(9600);
radio.begin(); radio.openWritingPipe(pipe);
}

void loop() {
mpu[0] = x_data; // x_data from mpu
mpu[1] = y_data; //y_data from mpu
radio.write(mpu, sizeof(mpu) );
}

how could i declare x_data and y_data ???

Piyumal:
how could i declare x_data and y_data ???

Perhaps
int x_data;
int y_data;
? ? ?

Do I get credit in this project? some sort of 'honourable mention'?

What's this "cord" all about then?

8 hours later and still no word back.

thank you very much,, i have tried that and it was compiled,, but there is nothing show in the serial monitor in transmitter side, i can't understand why is that.
i used this code..

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

//Transmitter

/* CE - 9
   CSN - 10
   SCK - 13
   MISO - 12
   MOSI - 11
   VCC - 3.3V
   GND - GN  */

#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10

int x_data;
int y_data;

const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe

RF24 radio(CE_PIN, CSN_PIN); // Create a Radio

int mpu[2]; // this constant have two elements: x - axis and y - axis

void setup() {
Serial.begin(9600);
radio.begin(); radio.openWritingPipe(pipe);
}

void loop() {
mpu[0] = x_data; // x_data from mpu
mpu[1] = y_data; //y_data from mpu
radio.write(mpu, sizeof(mpu) );
}

Piyumal:
there is nothing show in the serial monitor in transmitter side

There are no instructions there to do so.