Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hideakitai committed Jan 4, 2021
1 parent 7f2d271 commit bd76828
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ void setup() {

void loop() {
if (mpu.update()) {
mpu.printRollPitchYaw();
Serial.print(mpu.getYaw()); Serial.print(", ");
Serial.print(mpu.getPitch()); Serial.print(", ");
Serial.println(mpu.getRoll());
}
}
```
Expand Down Expand Up @@ -53,13 +55,15 @@ void setup() {
// calibrate anytime you want to
mpu.calibrateAccelGyro();
mpu.calibrateMag();

mpu.printCalibration();
}

void loop() { }
```
### Coordinate
The coordinate of quaternion and euler angles are based on the axes of acceleration and gyro sensors (Right-Handed, X-forward, Z-up). On the other hand, roll, pitch, and yaw angles are basedd on airplane coordinate (Right-Handed, X-forward, Z-down). Please use `getEulerX/Y/Z()` for euler angles and `getRoll/Pitch/Yaw()` for airplane coordinate angles.
## Other Settings
Expand Down Expand Up @@ -189,7 +193,6 @@ MPU9255 mpu;
bool setup(const uint8_t addr, const MPU9250Setting& setting, WireType& w = Wire);
void verbose(const bool b);
void ahrs(const bool b);
void useRawPitchYawRollDirection(const bool b);
void calibrateAccelGyro();
void calibrateMag();
bool isConnected();
Expand All @@ -202,7 +205,10 @@ float getRoll() const;
float getPitch() const;
float getYaw() const;

float getQuaternion(uint8_t i) const;
float getEulerX() const;
float getEulerY() const;
float getEulerZ() const;

float getQuaternionX() const;
float getQuaternionY() const;
float getQuaternionZ() const;
Expand Down Expand Up @@ -253,15 +259,6 @@ void setMagScale(const float x, const float y, const float z);
void setMagneticDeclination(const float d);

bool selftest();

void print() const;
void printRawData() const;
void printAcc() const;
void printGyro() const;
void printMag() const;
void printQuaternion() const;
void printRollPitchYaw() const;
void printCalibration() const;
```
## License
Expand Down

0 comments on commit bd76828

Please sign in to comment.