There is some problem with this sensor reading...
I programmed that LEDs should strobe if g-force > 1. After arduino starts sensor is too sensitive, it's starting strobe if i turn it ~20 degrees. But when i start Serial Monitor it works normal and starts strobe when sensor turned in 90 degree(~1G).
Can anyone explain it?
accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
float gForceY = float(ay) / 4096; //Up to 8G
if (gForceY > 1 && !isStrobeFast && !isStrobeSlow ) {
isStrobeFast = true;
strStart = millis();
}
if (isStrobeFast)
isStrobeFast = StrobeMs(70, 8, strStart, isStrobeFast);