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).
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..
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
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) );
}