nikel1992 Posted February 16, 2021 Report Share Posted February 16, 2021 Hello guys. I am trying to make an alarm for a moving object using mpu6050. I connected the sensor to Arduino and tried to attach it to an object from my house, in case someone moves it, even very slowly, I want to know. The problem is that i made the motion interrupt setting but if i move the object slowly, it does not detect anything, whereas If i tap it, I get imediately an alarm. What you think, what should I tune? Does it have a connection with the accelerometer range or sample rate? Thanks. // Here it is set the motion detect routine . You are able to set the sensitivity of the module. // The values motion duration and motion threshold sets the sensitivity of the module. mpu6050_writeByte(MPU6050_RA_INT_ENABLE, 0x40); //MOTION DURATION mpu6050_writeByte(MPU6050_RA_FF_DUR, 1); //MOTION THR mpu6050_writeByte(MPU6050_RA_FF_THR, sensitivity); mpu6050_writeByte(0x68, MPU6050_PWR1_CYCLE_BIT); mpu6050_writeByte(0x6C, 135); _delay_ms(1); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.