Open DRagonenko opened 7 years ago
Hi DRagonenko, If you are using the MPU6050, please first execute the calibration using the sketch: https://github.com/Protonerd/DIYino/blob/master/MPU6050_calibration.ino
Here please take care to select the right position in the EEPROM to store the values. If you use LSOS v1.5, please use:
If an earlier version:
In the LSOS code the calib values will be fetched from this location, code-wise it can be found here:
// retreive MPU6050 calibrated offset values from EEPROM
EEPROM.setMemPool(MEMORYBASEMPUCALIBOFFSET, EEPROMSizeATmega328);
int addressInt=MEMORYBASEMPUCALIBOFFSET;
mpu.setXAccelOffset(EEPROM.readInt(addressInt));
#ifdef LS_INFO
int16_t output;
output = EEPROM.readInt(addressInt);
Serial.print("address: ");Serial.println(addressInt);Serial.print("output: ");Serial.println(output);Serial.println("");
#endif
addressInt = addressInt + 2; //EEPROM.getAddress(sizeof(int));
mpu.setYAccelOffset(EEPROM.readInt(addressInt));
#ifdef LS_INFO
output = EEPROM.readInt(addressInt);
Serial.print("address: ");Serial.println(addressInt);Serial.print("output: ");Serial.println(output);Serial.println("");
#endif
addressInt = addressInt + 2; //EEPROM.getAddress(sizeof(int));
mpu.setZAccelOffset(EEPROM.readInt(addressInt));
#ifdef LS_INFO
output = EEPROM.readInt(addressInt);
Serial.print("address: ");Serial.println(addressInt);Serial.print("output: ");Serial.println(output);Serial.println("");
#endif
addressInt = addressInt + 2; //EEPROM.getAddress(sizeof(int));
mpu.setXGyroOffset(EEPROM.readInt(addressInt));
#ifdef LS_INFO
output = EEPROM.readInt(addressInt);
Serial.print("address: ");Serial.println(addressInt);Serial.print("output: ");Serial.println(output);Serial.println("");
#endif
addressInt = addressInt + 2; //EEPROM.getAddress(sizeof(int));
mpu.setYGyroOffset(EEPROM.readInt(addressInt));
#ifdef LS_INFO
output = EEPROM.readInt(addressInt);
Serial.print("address: ");Serial.println(addressInt);Serial.print("output: ");Serial.println(output);Serial.println("");
#endif
addressInt = addressInt + 2; //EEPROM.getAddress(sizeof(int));
mpu.setZGyroOffset(EEPROM.readInt(addressInt));
#ifdef LS_INFO
output = EEPROM.readInt(addressInt);
Serial.print("address: ");Serial.println(addressInt);Serial.print("output: ");Serial.println(output);Serial.println("");
#endif
/ UNIT1 / mpu.setXAccelOffset(46); mpu.setYAccelOffset(-4942); mpu.setZAccelOffset(4721); mpu.setXGyroOffset(23); mpu.setYGyroOffset(-11); mpu.setZGyroOffset(44);
Have a look at this, it sounds like the problem I had.
https://github.com/neskweek/LightSaberOS/issues/41
Forgot the link
did the calibration
amended uploaded
and the same thing please help
you have to amend it in the Config.h file like this:
only blows =(
When you calibrated the board with the sketch I've sent you, did you press y and enter at the end to save the values into the EEPROM? Looking at the screen shot I have the impression that you did not.
pressed . =(
tried everything. Only the collision the dream is dead =((( please help
OK, please send me your whole wiring diagram. Or buy a DIYino board, those boards are assured to work! If I know your circuitry, I might figure out what is wrong. BTW, what do you mean by "collosion"?
https://yadi.sk/d/bI9wkqg63GLyHq
"collosion"(works only by hit) Sorry if I have mistakes. I'm not good enough in English
Thanks for the help. updated libraries and seems to work. thank you very much
when driving hangs playing music
Could you help me with Mpu 6058. in project LSOS 1.4, please? It works only by hit. And movement works only with a hit of the player or doesn't work at all. I can't understand how to fix it. I had coded colibration data but nothing changed. Sorry if I have mistakes. I'm not good enough in English