     static bool once = true;
     static elapsedMillis timeElapsed;
     static elapsedMillis light;
+    static elapsedMillis hadUsb;
 
     static my_helpers::Circular<decltype(az0) , READINGS_AMOUNT_AVR> az(0);
     static my_helpers::Circular<decltype(el0) , READINGS_AMOUNT_AVR> el(0);

                    }
                }
            }
        }

        if (abs(az.lastDelta()) > lightSens || abs(el.lastDelta()) > lightSens)
        {
            light = 0;
#ifdef USE_LCD
            analogWrite(backLightPin, 100);
#endif
        }

        if (light > 30000)
        {
#ifdef USE_LCD
            digitalWrite(backLightPin, LOW);
#endif
            set_sleep_mode(SLEEP_MODE_IDLE); //only idle seems works by interrupt from sensor
            sleep_enable();
            sleep_mode();
            sleep_disable();
        }
        else
        {
#ifdef USE_LCD
            if (light > 7000) analogWrite(backLightPin, 10);
#endif

            if (timeElapsed > 250)
            {
                auto t = mpu.getTemperature() / 340. + +36.53; //celsius
                printValues(getAz(az - az0), el - el0, t);
                timeElapsed = 0;
            }
        }
    }
}
                mpu.getFIFOBytes(fifoBuffer, packetSize);
                fifoCount -= packetSize;
                mpu.dmpGetQuaternion(msg.message.value.vals.current_quat, fifoBuffer);
                mpu.dmpGetQuaternion(&q, fifoBuffer);
                q.normalize();

                mpu.dmpGetGravity(&gravity, &q);
                gravity.normalize();

                //https://www.reddit.com/r/Astronomy/comments/3udenf/quaternion_matrix_or_euler_angles_conversion_to/
                auto elt = removeRotRad<decltype(el0)>(atan(gravity.x / sqrt(sqrf(gravity.y) + sqrf(gravity.z))));
                el.push_back(elt);

                decltype(az0) azt;

                // if (elt > radians(45))
                azt = -2.f * atan2(q.z, q.w);
                // else
                // azt = atan2(2 * (q.x* q.y -  q.w * q.z), 2 * (q.w * q.w +  q.x * q.x) - 1);
                az.push_back(getAz(azt));
            }
            while (fifoCount > 0);
        }
