void sensorsCalibrate() { sensorsRead(); memcpy(&Config.GYRO_zero, &GYRO_raw, sizeof(Config.GYRO_zero)); memcpy(&Config.ACC_zero, &ACC_raw, sizeof(Config.ACC_zero)); //Config.ACC_zero[ZAXIS] -= 124; Config.CalibrateFlags = 1; }
void loop() { buttonLoop(); webServerLoop(); if(takeReadingsNow) { takeReadingsNow = false; sensorsRead(); if(graphiteServer) sendReadingsToGraphite(); } }