Arduino data logging problems

Hello!
I flew a model rocket with active roll control. I have my homemade altimeter onboard to control the roll of the vehicle and to log data. I have done this several times before and have always successfully logged the data to a micro SD card. However, after the flight I checked the card and didn't find a file :frowning:
I don't know why this happened. It worked fine in my integrated testing before and after the launch and the software has worked before on this rocket with only changes to the control algorithm.

Does anyone have any suggestions as to what might be going on?
Thanks so much!

Code

Preformatted text

#include <Adafruit_LSM6DS33.h>

// For SPI mode, we need a CS pin
#define LSM_CS 10
// For software-SPI mode we need SCK/MOSI/MISO pins
#define LSM_SCK 13
#define LSM_MISO 12
#define LSM_MOSI 11
#include <math.h>
Adafruit_LSM6DS33 lsm6ds33;
#include <BMP388_DEV.h> 
#include <SD.h>
#include <SPI.h>
#include <Servo.h>

Servo pitchServo;
Servo yawServo;
Servo pitchServo1;
Servo yawServo1;


float temperature, pressure, altitude; //call the temp, pressure, and altitude variables for the barometer
float altitudeoffset = 0;//set the offset variable to get altitude above ground level
float Altitude_true = 0;//altitude above the ground
float altfilt = 0;// variable to filter altitude data

float yawServoVal = 0;
float yawServoVal1 = 0;
float yawTarget = 0;

float pitchServoVal = 0;
float pitchServoVal1 = 0;
float pitchTarget = 0;

float rollServoVal = 0;
float rollTarget = 0;

float roll_Pgain = 0.00555555;
float pitch_yaw_Pgain = 0.05;


File dataFile;//set data file for micro sd card

int chipSelect = 4;// call the chip select pin for the micro sd card


float alt_past_counter = 1;
float alt_present_counter = 1;

float alt_past = 0;
float alt_present = 0;

float anglecounter = 0;// a counter that is used to tell when to recalibrate angle data

float recalibratecounter = 0;// a counter that is used to tell when to recalibrate the sensors

float  millisoffset = 0;// variable to offset millis

#include <math.h>

float anglexoffset = 0;
float angleyoffset = 0;
float anglezoffset = 0;

float gyroxoffset = 0;
float gyroyoffset = 0;
float gyrozoffset = 0;

float thetaG=0;//pitch, yaw, and roll angles from the gyro
float phiG=0;
float yawG = 0;  

float systemstate = -1; // a system state variable to switch from pad idle to launch

BMP388_DEV bmp388(9);

float millisOld = 0;

float dt; //delay time 

float rollG;

float landing_time = 0;

float propellentloss = 14.9583333333; //declare the amount of propellent burned by the E20 mtor every second


float wetmass = 460; // declare the total mass of the rocket on the launch pad

float loop_mass_reduction = 0; //this variable will contain the propellent loss each clock cycle.


float masscounter = 1;

//set up some timing variables
float previous_time; // set up time at end of loop
float Time; // set up time at start of loop
float time_actual;//set up the difference in time, also the actual time
float time_offset; // set up the time offset
float apogee = -1;
float apogee_time = 0;
float mos = 5;
void setup() {
  Serial.begin(115200); // start serial monitor



    
bmp388.begin();                                   // Default initialisation, place the BMP388 into SLEEP_MODE 
  bmp388.setTimeStandby(TIME_STANDBY_80MS);       // Set the standby time to 1.3 seconds
  bmp388.startNormalConversion(); 


SD.begin(chipSelect);// start the SD card
 
Serial.println("Adafruit LSM6DSOX test!");

  
  if (!lsm6ds33.begin_I2C()) {
    // if (!lsm6ds33.begin_SPI(LSM_CS)) {
    // if (!lsm6ds33.begin_SPI(LSM_CS, LSM_SCK, LSM_MISO, LSM_MOSI)) {
    Serial.println("Failed to find LSM6DS33 chip");
    
  }
  
   lsm6ds33.setAccelRange(LSM6DS_ACCEL_RANGE_16_G);
  Serial.print("Accelerometer range set to: ");
  switch (lsm6ds33.getAccelRange()) {
  case LSM6DS_ACCEL_RANGE_16_G:
    Serial.println("+-2G");
    break;
  case LSM6DS_ACCEL_RANGE_4_G:
    Serial.println("+-4G");
    break;
  case LSM6DS_ACCEL_RANGE_8_G:
    Serial.println("+-8G");
    break;

    Serial.println("+-16G");
    break;
  }

  lsm6ds33.setGyroRange(LSM6DS_GYRO_RANGE_2000_DPS);
  Serial.print("Gyro range set to: ");
  switch (lsm6ds33.getGyroRange()) {
  case LSM6DS_GYRO_RANGE_2000_DPS:
    Serial.println("125 degrees/s");
    break;
  case LSM6DS_GYRO_RANGE_250_DPS:
    Serial.println("250 degrees/s");
    break;
  case LSM6DS_GYRO_RANGE_500_DPS:
    Serial.println("500 degrees/s");
    break;
  case LSM6DS_GYRO_RANGE_1000_DPS:
    Serial.println("  1000 degrees/s");
    break;

    Serial.println("2000 degrees/s");
    break;
  case ISM330DHCX_GYRO_RANGE_4000_DPS:
    break; // unsupported range for the DSOX
  }

  // sox.setAccelDataRate(LSM6DS_RATE_12_5_HZ);
  Serial.print("Accelerometer data rate set to: ");
  switch (lsm6ds33.getAccelDataRate()) {
  case LSM6DS_RATE_SHUTDOWN:
    Serial.println("0 Hz");
    break;
  case LSM6DS_RATE_12_5_HZ:
    Serial.println("12.5 Hz");
    break;
  case LSM6DS_RATE_26_HZ:
    Serial.println("26 Hz");
    break;
  case LSM6DS_RATE_52_HZ:
    Serial.println("52 Hz");
    break;
  case LSM6DS_RATE_104_HZ:
    Serial.println("104 Hz");
    break;
  case LSM6DS_RATE_208_HZ:
    Serial.println("208 Hz");
    break;
  case LSM6DS_RATE_416_HZ:
    Serial.println("416 Hz");
    break;
  case LSM6DS_RATE_833_HZ:
    Serial.println("833 Hz");
    break;
  case LSM6DS_RATE_1_66K_HZ:
    Serial.println("1.66 KHz");
    break;
  case LSM6DS_RATE_3_33K_HZ:
    Serial.println("3.33 KHz");
    break;
  case LSM6DS_RATE_6_66K_HZ:
    Serial.println("6.66 KHz");
    break;
  }

  // sox.setGyroDataRate(LSM6DS_RATE_12_5_HZ);
  Serial.print("Gyro data rate set to: ");
  switch (lsm6ds33.getGyroDataRate()) {
  case LSM6DS_RATE_SHUTDOWN:
    Serial.println("0 Hz");
    break;
  case LSM6DS_RATE_12_5_HZ:
    Serial.println("12.5 Hz");
    break;
  case LSM6DS_RATE_26_HZ:
    Serial.println("26 Hz");
    break;
  case LSM6DS_RATE_52_HZ:
    Serial.println("52 Hz");
    break;
  case LSM6DS_RATE_104_HZ:
    Serial.println("104 Hz");
    break;
  case LSM6DS_RATE_208_HZ:
    Serial.println("208 Hz");
    break;
  case LSM6DS_RATE_416_HZ:
    Serial.println("416 Hz");
    break;
  case LSM6DS_RATE_833_HZ:
    Serial.println("833 Hz");
    break;
  case LSM6DS_RATE_1_66K_HZ:
    Serial.println("1.66 KHz");
    break;
  case LSM6DS_RATE_3_33K_HZ:
    Serial.println("3.33 KHz");
    break;
  case LSM6DS_RATE_6_66K_HZ:
    Serial.println("6.66 KHz");
    break;
  }
 
 lsm6ds33.configInt1(false, false, true); // accelerometer DRDY on INT1
  lsm6ds33.configInt2(false, true, false); // gyro DRDY o
  
pitchServo.attach(6); // Attaches the servo on pin 6 to the
yawServo.attach(7); // Attaches the servo on pin 6 to the
pitchServo.write(90); // Put servo2 at home postion
yawServo.write(147); // Put servo2 at home postion
delay(500);
pitchServo.write(45);
yawServo.write(70);
delay(500);
pitchServo.write(120);
yawServo.write(180);
delay(500);
pitchServo.write(90); // Put servo2 at home postion
yawServo.write(92); // Put servo2 at home postion


pitchServo1.attach(6); // Attaches the servo on pin 6 to the
yawServo1.attach(7); // Attaches the servo on pin 6 to the
pitchServo1.write(90); // Put servo2 at home postion
yawServo1.write(147); // Put servo2 at home postion
delay(500);
pitchServo1.write(45);
yawServo1.write(70);
delay(500);
pitchServo1.write(120);
yawServo1.write(180);
delay(500);
pitchServo1.write(90); // Put servo2 at home postion
yawServo1.write(92); // Put servo2 at home postion
delay(2000);
}

void loop() {
  dataFile = SD.open("dat.txt", FILE_WRITE);//open the sd card file
Time = millis();


   if(systemstate > 0 && (Time/1000)/alt_past_counter > 0.1) {
    alt_past_counter = alt_past_counter++;
    bmp388.getMeasurements(temperature, pressure, altitude); // get another set of measurements.
    alt_past = altitude;
   }
 
    

 if(systemstate < 0 && (Time/1000)/recalibratecounter >5 )  // check the time and if we have launched. If we havn't launched recalibrate th sensors every 5 seconds
  {
    

  bmp388.getMeasurements(temperature, pressure, altitude); // get another set of measurements.
  altitudeoffset = altitude; 


 recalibratecounter = recalibratecounter + 1;//this will hold how many times we preformed this loop

  //DO THE SETUP FUNCTION AGAIN
 
    
if (!lsm6ds33.begin_I2C()) {
    // if (!lsm6ds33.begin_SPI(LSM_CS)) {
    // if (!lsm6ds33.begin_SPI(LSM_CS, LSM_SCK, LSM_MISO, LSM_MOSI)) {
    Serial.println("Failed to find LSM6DS33 chip");
    
  }


  lsm6ds33.setAccelRange(LSM6DS_ACCEL_RANGE_16_G);
  //Serial.print("Accelerometer range set to: ");
  switch (lsm6ds33.getAccelRange()) {
  case LSM6DS_ACCEL_RANGE_16_G:
    //Serial.println("+-2G");
    break;
  case LSM6DS_ACCEL_RANGE_4_G:
    Serial.println("+-4G");
    break;
  case LSM6DS_ACCEL_RANGE_8_G:
    Serial.println("+-8G");
    break;

    Serial.println("+-16G");
    break;
  }

   
    lsm6ds33.setGyroRange(LSM6DS_GYRO_RANGE_2000_DPS);
  //Serial.print("Gyro range set to: ");
  switch (lsm6ds33.getGyroRange()) {
  case LSM6DS_GYRO_RANGE_2000_DPS:
    //Serial.println("125 degrees/s");
    break;
  case LSM6DS_GYRO_RANGE_250_DPS:
    //Serial.println("250 degrees/s");
    break;
  case LSM6DS_GYRO_RANGE_500_DPS:
    //Serial.println("500 degrees/s");
    break;
  case LSM6DS_GYRO_RANGE_1000_DPS:
    //Serial.println("1000 degrees/s");
    break;

    //Serial.println("2000 degrees/s");
    break;
  case ISM330DHCX_GYRO_RANGE_4000_DPS:
    break; // unsupported range for the DSOX
  }

  // sox.setAccelDataRate(LSM6DS_RATE_12_5_HZ);
  //Serial.print("Accelerometer data rate set to: ");
  switch (lsm6ds33.getAccelDataRate()) {
  case LSM6DS_RATE_SHUTDOWN:
    //Serial.println("0 Hz");
    break;
  case LSM6DS_RATE_12_5_HZ:
    //Serial.println("12.5 Hz");
    break;
  case LSM6DS_RATE_26_HZ:
    //Serial.println("26 Hz");
    break;
  case LSM6DS_RATE_52_HZ:
    //Serial.println("52 Hz");
    break;
  case LSM6DS_RATE_104_HZ:
    //Serial.println("104 Hz");
    break;
  case LSM6DS_RATE_208_HZ:
    //Serial.println("208 Hz");
    break;
  case LSM6DS_RATE_416_HZ:
    //Serial.println("416 Hz");
    break;
  case LSM6DS_RATE_833_HZ:
    //Serial.println("833 Hz");
    break;
  case LSM6DS_RATE_1_66K_HZ:
    //Serial.println("1.66 KHz");
    break;
  case LSM6DS_RATE_3_33K_HZ:
    //Serial.println("3.33 KHz");
    break;
  case LSM6DS_RATE_6_66K_HZ:
    //Serial.println("6.66 KHz");
    break;
  }

  // sox.setGyroDataRate(LSM6DS_RATE_12_5_HZ);
  //Serial.print("Gyro data rate set to: ");
  switch (lsm6ds33.getGyroDataRate()) {
  case LSM6DS_RATE_SHUTDOWN:
    //Serial.println("0 Hz");
    break;
  case LSM6DS_RATE_12_5_HZ:
    //Serial.println("12.5 Hz");
    break;
  case LSM6DS_RATE_26_HZ:
    //Serial.println("26 Hz");
    break;
  case LSM6DS_RATE_52_HZ:
    //Serial.println("52 Hz");
    break;
  case LSM6DS_RATE_104_HZ:
    //Serial.println("104 Hz");
    break;
  case LSM6DS_RATE_208_HZ:
    //Serial.println("208 Hz");
    break;
  case LSM6DS_RATE_416_HZ:
    //Serial.println("416 Hz");
    break;
  case LSM6DS_RATE_833_HZ:
    //Serial.println("833 Hz");
    break;
  case LSM6DS_RATE_1_66K_HZ:
   // Serial.println("1.66 KHz");
    break;
  case LSM6DS_RATE_3_33K_HZ:
   // Serial.println("3.33 KHz");
    break;
  case LSM6DS_RATE_6_66K_HZ:
   // Serial.println("6.66 KHz");
    break;
  }
  }
  
  sensors_event_t accel;
  sensors_event_t gyro;
  sensors_event_t temp;
  lsm6ds33.getEvent(&accel, &gyro, &temp);
  
float gyrox = gyro.gyro.x;
float gyroy = gyro.gyro.y;
float gyroz = gyro.gyro.z;

    if(systemstate < 0) {
delay(100);
    time_offset = millis();
  }
 
  // check the accelerometer to see if we have launched
if(accel.acceleration.x < -13)
{
systemstate = 2;// if we launched set the system state to 1


}


if(time_actual > 2.41) {
  systemstate = 3;
  
}
if(apogee > 0 && Altitude_true < 20) {
landing_time = millis()/1000;
  
}

if(apogee > 0 && Altitude_true < 20 && landing_time > 5) {
 Serial.print(" landing ");
 dataFile.print(" landing ");
}
else{
  Serial.print(" Not_land " );
  dataFile.print(" Not_land ");
}

  if(systemstate > 0) {
   bmp388.getMeasurements(temperature, pressure, altitude); // get another set of measurements.
Altitude_true = altitude - altitudeoffset; // call altitude above ground as the altitude above sea level subtracted from the offset

  }
    // filter for altitude data
   if(abs(alt_past - alt_present) > 50 && systemstate > 0) //check if the difference in altitude is greater than 50(meaning the reading is innacurate) if so, don't preform the rest of the loop
   
 {
 dataFile.print(" filter ");

 }
 else {
dataFile.print(" not_filter ");
 }
  if(abs(alt_past - alt_present) < 50 && systemstate > -2)
 {
 millisoffset = millis()/100;
 
if(systemstate >2 && systemstate < 4) {
apogee_time = millis();
}
 if(systemstate > 2 && time_actual >= 6.2)// check if the current altitude is less than the previous altitude, if so we are descending
     {
digitalWrite(mos, HIGH);//uncomment these 3 lines if you want to fire a pyro channel at apogee
if(millis()/1000 - apogee_time/1000 > 2) {
digitalWrite(mos, LOW);

}
 apogee = 1;


  }
  if(systemstate > 0 && thetaG > 100){  
digitalWrite(mos, HIGH);//uncomment these 3 lines if you want to fire a pyro channel at apogee
if(millis()/1000 - apogee_time/1000 > 2) {
digitalWrite(mos, LOW);

}
 apogee = 1;

  }
  if(systemstate > 0 && yawG > 100) { 
digitalWrite(mos, HIGH);//uncomment these 3 lines if you want to fire a pyro channel at apogee
if(millis()/1000 - apogee_time/1000 > 2) {
digitalWrite(mos, LOW);

}
 apogee = 1;
  }
if(apogee < 1) {
dataFile.print(" not_apogee ");
Serial.print(" not_apogee ");
 

    
  }
  else {
    Serial.print(" Apogee ");
    dataFile.print(" Apogee ");
  }
  if(apogee > 0) {
    systemstate = 4;
    
  }
  
 }
  
 if(systemstate > 0 && (Time/1000)/alt_present_counter > 0.1) {
    alt_present_counter = alt_present_counter++;
    bmp388.getMeasurements(temperature, pressure, altitude); // get another set of measurements.
    alt_present = altitude;
   }
 
previous_time = millis();


  
time_actual = Time/1000 - time_offset/1000;
 
 // find the difference in time
dt=(millis()-millisOld)/1000.;
millisOld=millis();

if(time_actual > 0 && time_actual < 0.6) {
//  roll1Target = phiG;
pitchTarget = thetaG;
}
if(time_actual > 0.6) {

thetaG=thetaG+(gyroy * 57.2958 + 6.23 )*dt;// caculate angles
phiG=phiG-(gyrox * 57.2958  - 2.66)*dt;
yawG=yawG-(gyroz *57.2958 + 3.5) *dt;

pitchServoVal = thetaG - pitchTarget;
pitchServoVal = pitchServoVal * pitch_yaw_Pgain;

rollServoVal = (gyrox * 57.2958  - gyroxoffset) - rollTarget;
rollServoVal = rollServoVal * roll_Pgain;

pitchServoVal = pitchServoVal + rollServoVal;
pitchServoVal1 = pitchServoVal;

if(pitchServoVal > 5) {
pitchServoVal = 97;
}

if(pitchServoVal < -5) {
pitchServoVal = 87;
}


if(pitchServoVal1 > 5) {
pitchServoVal1 = 97;
}

if(pitchServoVal1 < -5) {
pitchServoVal1 = 87;
}

pitchServo.write(pitchServoVal + 92);
pitchServo1.write(pitchServoVal1 + 92);


yawServoVal = yawG - yawTarget;
yawServoVal = yawServoVal * pitch_yaw_Pgain;

yawServoVal = yawServoVal + rollServoVal;

yawServoVal1 = yawServoVal;

if(yawServoVal > 5) {
yawServoVal = 95;
}

if(yawServoVal < -5) {
yawServoVal = 85;
}

if(yawServoVal1 > 5) {
yawServoVal1 = 95;
}

if(yawServoVal1 < -5) {
yawServoVal1 = 85;
}
yawServo.write(yawServoVal + 90);
yawServo1.write(yawServoVal1 + 90);
}
  //print out all the data
 
 if(time_actual > 0 && time_actual < 2.41) {

loop_mass_reduction = ((previous_time/1000)-(Time/1000)) * 9.52941176471;

wetmass = wetmass - loop_mass_reduction;
 }

 if(systemstate > -2) {
  
Serial.print(" landing_time is ");
Serial.print(yawServoVal);  
Serial.print(" systemstate is ");
Serial.print(yawServoVal1);

Serial.print(" Temp ");
Serial.print(pitchServoVal); 
Serial.print(" Pressure ");                   
Serial.print(pitchServoVal1);  
Serial.print(" Altitude True ");
Serial.print(Altitude_true);

Serial.print(" wetmass ");
Serial.print(wetmass);
Serial.print(" Time since startup ");
Serial.print(Time/1000);
Serial.print(" Time since launch ");
Serial.print(time_actual);

Serial.print("  gyro yaw  "); // print out these angles
Serial.print(yawG);
Serial.print("  gyro roll ");
Serial.print(phiG);
Serial.print("  gyro pitch  ");
Serial.print(thetaG);


Serial.print(" YawServoVal ");
Serial.print(pitchServoVal);
Serial.print(" YawServoTarget ");
//Serial.print(YawServoVal);



Serial.print(" Acceleration X ");
Serial.print(accel.acceleration.x);
Serial.print(" Y ");
 Serial.print(accel.acceleration.y);
Serial.print(" Z ");
  Serial.print(accel.acceleration.z);
  
Serial.print(" gyro rates X ");
  Serial.print(gyro.gyro.x * 57.2958 - 2.66);
Serial.print(" Y ");
  Serial.print(gyro.gyro.y * 57.2958 + 6.23);
  Serial.print(" Z ");
  Serial.println(gyro.gyro.z * 57.2958 + 3.5);

 

if(accel.acceleration.x < -13) {

dataFile.print(" launch ");
Serial.print(" launch ");

  
}

else {

dataFile.print(" not_launch ");

Serial.print(" not_launch ");
  
}
dataFile.print(" landing_time is ");
dataFile.print(landing_time);  
dataFile.print(" systemstate is ");
dataFile.print(systemstate);
dataFile.print(" Altitude present ");
//dataFile.print(altitudepresent);
dataFile.print(" Temp ");
dataFile.print(temperature); 
dataFile.print(" Pressure ");                   
dataFile.print(pressure);  
dataFile.print(" Altitude True ");
dataFile.print(Altitude_true);

 dataFile.print(" wetmass ");
dataFile.print(wetmass);
dataFile.print(" Time since startup ");
dataFile.print(Time/1000);
dataFile.print(" Time since launch ");
dataFile.print(time_actual);
dataFile.print(" gyro yaw "); // print out these angles
dataFile.print(yawG);
dataFile.print(" gyro roll ");
dataFile.print(phiG);
dataFile.print(" gyro pitch ");
dataFile.print(thetaG);

dataFile.print(" Acceleration X ");
dataFile.print(accel.acceleration.x);
dataFile.print(" Y ");
dataFile.print(accel.acceleration.y);
dataFile.print(" Z ");
dataFile.print(accel.acceleration.z);
dataFile.print(" gyro rates X ");
dataFile.print(gyro.gyro.x* 57.2958-gyroxoffset);
dataFile.print(" Y ");
dataFile.print(gyro.gyro.y*57.2958 + gyroyoffset);
dataFile.print(" Z ");
dataFile.println(gyro.gyro.z*57.2958 - gyrozoffset);


 dataFile.close();
 }


  //}

previous_time  = millis();

if(systemstate < 2 &&(Time/1000)/anglecounter >5) // if we are on the pad, offset the angles every 5 seconds
  {
    
sensors_event_t accel;
  sensors_event_t gyro;
  sensors_event_t temp;
  lsm6ds33.getEvent(&accel, &gyro, &temp);
  
 anglecounter = anglecounter + 1;
    
gyroxoffset = gyro.gyro.x * 57.2958;


gyroyoffset = gyro.gyro.y * 57.2958;


gyrozoffset = gyro.gyro.z * 57.2958;

   
  }

 if(systemstate < 0 &&(Time/1000)/anglecounter >5) // if we are on the pad, offset the angles every 5 seconds
  {
    
sensors_event_t accel;
  sensors_event_t gyro;
  sensors_event_t temp;
  lsm6ds33.getEvent(&accel, &gyro, &temp);
  
    // find the difference in time
dt=(millis()-millisOld)/1000.;
millisOld=millis();

thetaG=thetaG+(gyroy * 57.2958  + gyroyoffset)*dt;// caculate angles
phiG=phiG-(gyrox * 57.2958  -gyroxoffset)*dt;
yawG=yawG-(gyroz *57.2958 -gyrozoffset) *dt;

    anglecounter = anglecounter + 1;
    
anglexoffset = phiG;
phiG = abs(phiG - anglexoffset);

angleyoffset = thetaG;
thetaG = abs(thetaG - angleyoffset);

anglezoffset = yawG;
yawG= abs(yawG - anglezoffset);
   
  }



}

soldered connections, or headers and connectors? If the latter, could one have been loose?

It's possible,
but wouldn't I notice the problem after and before the fact when I tested it?

I'm thinking not blatantly obviously loose connection, but rather just a poor connection. can come and go at random. Problem is, can be fiendishly difficult to find. Just one pin in a header that doesn't fit snuggly can cause this. But, it's pretty unusual unless you've been plugging/unplugging a lot. More common is one pin poorly soldered on a board. Soldering is an art, and I've seen some pretty outlandish crap coming from Amazon; it's obvious that some of the product is going through a resoldering lab, where people fix boards that failed in production. The fix is resoldering one or more pins, usually the evidence is solder rosin around just a few pins on an otherwise good-looking board. When I find these, I resolder them myself, then test the item, because I don't believe they test after they redo.
C

I see a lot of delay()s in the code. Your logging is start at least 5 seconds after reset. Perhaps your flight is finished at this time?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.