6050 deadzone?

Hey guys, im amature AF. Trying to make myself an air mouse, i had to change gyro sense to 16g to make it usable as sense was crazy high but i've noticed its not picking up very small inputs like there's a deadzone and slow ones are stuttery. So having sense at 2g its crazy high sense which i can lower through windows option but if the sensor is moved too fast it stops reading inputs.

Im guessing ive hit some limitations here or the sense went up crazy high as ive got delay set at 0.1 to increase polling rate, could it be i need to increase delay and set up a higher polling rate instead?

"AF"?

as fuck im quite the noob xD

Bump

No one got any clues here? :frowning:

The gyro isn't set to 16g or 2g, that's the accelerometer. Gyros are in degrees/second.

Code?

Circuit?

MarkT:
The gyro isn't set to 16g or 2g, that's the accelerometer. Gyros are in degrees/second.

Code?

Circuit?

Changes to the accel doesn't seem to make any differences :confused:

6050 with a leonardo.

Sure, here's my code! :slight_smile:

#include <Wire.h>
#include <I2Cdev.h>
#include <MPU6050.h>
#include <Mouse.h>

MPU6050 mpu;
int16_t ay, ax, az, gy, gx, gz;
int vy, vx;

void setup() {
Serial.begin(9600);
Wire.begin();
mpu.initialize();
if (!mpu.testConnection()) { while (1); }
mpu.setFullScaleAccelRange(0);
mpu.setFullScaleGyroRange(3);
mpu.setXGyroOffset(0);
mpu.setYGyroOffset(0);
mpu.setZGyroOffset(0);
}

void loop() {
mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

vx = (gx+100)/150; // 0 to 355
vy = -(gz+10)/150; // 355 to 0

Serial.print("gx = ");
Serial.print(gx);
Serial.print(" | gz = ");
Serial.print(gz);

Serial.print(" | X = ");
Serial.print(vx);
Serial.print(" | Y = ");
Serial.println(vy);

Mouse.move(vx, vy);

delay(0.1);
}