     for (int i = 0; i < numBytes; i++)
     {
         Serial.print(((byte*)val)[i]);
-        if(i < numBytes - 1)
-        Serial.print(F(", "));
+        if (i < numBytes - 1)
+            Serial.print(F(", "));
     }
     Serial.println(F("}"));
 

        float currentAlt = bmp.pressureToAltitude(seaLevelPressure, event.pressure, temperature) * METERS_TO_FEET_RATIO;
        return smoothAltitude(currentAlt);
    }
    
    return -1;
}
float smoothAltitude(float newAlt) {

        sum += lastAltitudes[i];
    }
    return sum / ALTITUDE_SMOOTHING;
}
// this is to check and see if our barometer is just returning 0s and reset the arduino
void checkBarometerDataIntegrity() {
    // only check when our altitude is at the end in order to avoid the initial {0,0,0...}
    if (lastAltitudeIndex != ALTITUDE_SMOOTHING) {
        return;
    }
    bool allZeros = true;
    for (int i = 0; i < ALTITUDE_SMOOTHING; i++) {
        if (lastAltitudes[i] != 0.0f) {
            allZeros = false;
        }
    }
    if (allZeros) {
        Serial.println("RESETTING ARDUINO");
        digitalWrite(resetPin, LOW);
    }

}

#endif
