Here's some code that works with the same setup I explained earlier, only it controls the mouse:
/* Tilt Control (Mouse Version) - King Dub Dub, 12/1/19
A tilt-controller script for USB-HID enabled Arduino boards with the MPU-6050 sensor.
Tilt to control an emulated mouse input, up for up, right for right, and so on.
There is an additional fail-safe that keeps any mouse data from being printed if pin 9
isn't grounded. Ground pin 9 with a switch/button when you want to send keyboard inputs.
MPU6050 - Arduino
VCC to 5V
GND to GND
SCL to A5 or SCL
SDA to A4 or SDA
ADO to GND
INT to digital pin 2
Pin 9 to button/switch to ground
*/
#include<Wire.h>
#include<Mouse.h>
const int MPU_addr=0x68;
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ; //sets up the accelerometer XYZ's, temperature, and gyro XYZ's
int minVal=265; //math-error
int maxVal=402; //checking
double x,y,z;
int MPUFail = 0;
void setup(){
Wire.begin();
Wire.beginTransmission(MPU_addr);
Wire.write(0x6B);
Wire.write(0);
Wire.endTransmission(true);
Serial.begin(9600);
pinMode(9, INPUT_PULLUP); //pin 9 is a fail-safe switch
Mouse.begin();
}
void loop(){
Wire.beginTransmission(MPU_addr);
Wire.write(0x3B); Wire.endTransmission(false);
Wire.requestFrom(MPU_addr,14,true);
AcX=Wire.read()<<8|Wire.read();
AcY=Wire.read()<<8|Wire.read();
AcZ=Wire.read()<<8|Wire.read();
int xAng = map(AcX,minVal,maxVal,-90,90);
int yAng = map(AcY,minVal,maxVal,-90,90);
int zAng = map(AcZ,minVal,maxVal,-90,90);
x= RAD_TO_DEG * (atan2(-yAng, -zAng)+PI);
y= RAD_TO_DEG * (atan2(-xAng, -zAng)+PI);
z= RAD_TO_DEG * (atan2(-yAng, -xAng)+PI);
if ((AcX == -1) and (AcY == -1) and (AcZ == -1)){
MPUFail = 1; //if the Arduino can't connect to the MPU, all raw values come out as -1,
} else { // so this is another fail-safe that stops it from pressing keys.
MPUFail = 0;
}
Serial.print("X= "); Serial.print("N/A"); //the X value doesn't work on our axis
Serial.print(" Y= "); Serial.print(y); //print the Y value
Serial.print(" Z= "); Serial.print(z); //print the Z value
Serial.print(" Safety: ");
if(digitalRead(9) == 0){ //prints if safety button is on:
Serial.print("Off");
} else {
Serial.print("On");
}
Serial.print("\n"); //prints a new line
if ((y >=130) and (digitalRead(9) == 0) and (MPUFail == 0)){ //if tilted left:
Mouse.move(-10, 0, 0); //move mouse left 10 units
delay(10);
}
if ((z <=340) and (z >= 180) and (digitalRead(9) == 0) and (MPUFail == 0)){ //if tilted down:
Mouse.move(0, -10, 0); //move mouse down 10 units
delay(10);
}
if ((y<=60) and (digitalRead(9) == 0) and (MPUFail == 0)){ //if tilted right:
Mouse.move(10, 0, 0); //move mouse right 10 units
delay(10);
}
if ((z >= 35) and (z<=179) and (digitalRead(9) == 0) and (MPUFail == 0)){ //if tilted up:
Mouse.move(0, 10, 0); //move mouse up 10 units
delay(10);
}
delay(10);//keeps a regulated speed
}
So make sure the MPU is upright on it's side and pin 9 is grounded, this is just a modified version of the earlier sketch. Note that the mouse speed is constant, you can add your own math to fine-tune the sensitivity and maybe change the speed depending on how far it's tilted. Just download this to your 32u4 board. Worry about bluetooth after you have something simple that works (even then, bluetooth is tricky and means you need a portable power source for your controller, which is why I don't like using bluetooth that much).
Alazor:
I have in the 32u4 to hc05:
32u4 - hc05
Gnd. Gnd
5v. VCC
D9. TXD
Its that ok? coz i havent got a cable from pin 9 to gnd 
And i didnt triyed without bt coz i dont know what code to put in just for try... im new, can u tell me someone to try please¿
they both pair perfect but maybe i should do the repair process to slave and master after uoload code again???
You can just change the code so a different pin needs to be grounded; heck, you could even get rid of the safety pin entirely, but that would cause many problems! Just change it to pin 7 or something if you want to go with that.