Update Payload_BME280_MPU6050_XS.ino changed access threshold

pull/346/head
Alan Johnston 1 year ago committed by GitHub
parent e090f3f418
commit 2450d67061
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -334,6 +334,7 @@ void loop() {
float rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ());
float acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ());
// Serial.println(" ");
// Serial.print(rotation);
// Serial.print(" ");
// Serial.println(acceleration);
@ -341,9 +342,12 @@ void loop() {
if (first_read == true) {
first_read = false;
rest = acceleration;
Serial.println(" ");
Serial.print("rest acceleration: ");
Serial.println(rest);
}
if (acceleration > 1.8 * rest)
if (acceleration > 1.1 * rest)
led_set(whiteLED, HIGH);
else
led_set(whiteLED, LOW);

Loading…
Cancel
Save

Powered by TurnKey Linux.