Update Payload_BME280_MPU6050_XS.ino add EEPROM commit

beta-cal
Alan Johnston 2 years ago committed by GitHub
parent 3b3fafbd26
commit 3113347b40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -165,6 +165,12 @@ void setup() {
eeprom_word_write(1, (int)(mpu6050.getGyroXoffset() * 100.0) + 0.5);
eeprom_word_write(2, (int)(mpu6050.getGyroYoffset() * 100.0) + 0.5);
eeprom_word_write(3, (int)(mpu6050.getGyroZoffset() * 100.0) + 0.5);
if (EEPROM.commit()) {
Serial.println("EEPROM successfully committed");
} else {
Serial.println("ERROR! EEPROM commit failed");
}
Serial.println(eeprom_word_read(0), HEX);
Serial.println(((float)eeprom_word_read(1)) / 100.0, DEC);

Loading…
Cancel
Save

Powered by TurnKey Linux.