TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: rzad on February 26, 2016, 04:34:11 PM

Title: DTap giving bogus answers from BMA250
Post by: rzad on February 26, 2016, 04:34:11 PM
Sometimes when I double tap in the negative Z, I get positive Z.

Sometimes when I double tap in one axis I will get another axis.

If you try the sketch (attached)
8ms flash every 3 sec is a heartbeat
1.5 sec solid led means BMA250 says it is -Z double tap
1.5 sec rapidly flash led means +X, -X, +Z (actually +Z has .5 sec solid before the flashing)
3 slow flashes is -Y
2 slow flashes is +Y

Appreciate ideas of how get more consistent results
Title: Re: DTap giving bogus answers from BMA250
Post by: Ben Rose on February 29, 2016, 08:16:59 PM
I gave your code a test- one thing I noticed is that the interrupt should probably be infinitely latched then cleared after reading. I made this change and had it print the sign/axis results- definitely not getting consistent/correct axis output. I tried bumping up the threshold, which seems to have marginally improved it. Maybe you need to change the g range or enable the internal filtering and set it to use that?

Ben