Skip to content

Commit

Permalink
fix keyword and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
inhwan.wee committed Nov 10, 2021
1 parent 6a5637e commit a3e58b4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ The motion threshold is given as a float value between 0 and 1020 mg mapped, whi
status = IMU.enableWakeOnMotion(400,MPU9250::LP_ACCEL_ODR_31_25HZ);
```

**int setUseSPIHS(bool useSPIHS)** set SPI Mode. This function returns a positive value on success and a negative value on failure. (It always returns a positive value because It try to change member variable.)

```C++
IMU.setUseSPIHS(bool useSPIHS);
```

### Common Data Collection Functions
The functions below are used to collect data from the ICM20689 sensor. Data is returned scaled to engineering units and transformed to a [common axis system](#sensor-orientation).

Expand All @@ -314,12 +320,25 @@ The functions below are used to collect data from the ICM20689 sensor. Data is r
```C++
IMU.readSensor();
```

**int readAcc(double* acc)** reads the accelerometer and stores the newest data in acc, it should be called every time you would like to retrieve data from the accelerometer. This function returns a positive value on success and a negative value on failure.

```C++
IMU.readAcc(double* acc);
```

**int readGyro(double* gyro)** reads the gyroscope and stores the newest data in gyro, it should be called every time you would like to retrieve data from the gyroscope. This function returns a positive value on success and a negative value on failure.

```C++
IMU.readGyro(double* gyro);
```

**int readAccGyro(double* accGyro)** reads the accelerometer and the gyroscope, and stores the newest data in accGyro, it should be called every time you would like to retrieve data from the accelerometer and the gyroscope. This function returns a positive value on success and a negative value on failure.

```C++
IMU.readAccGyro(double* accGyro);
```

**float getAccelX_mss()** gets the accelerometer value from the data buffer in the X direction and returns it in units of m/s/s.

```C++
Expand Down
4 changes: 3 additions & 1 deletion keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ enableDataReadyInterrupt KEYWORD2
disableDataReadyInterrupt KEYWORD2
isInterrupted KEYWORD2
enableWakeOnMotion KEYWORD2
enableWakeOnMotion KEYWORD2
setUseSPIHS KEYWORD2
enableFifo KEYWORD2
readSensor KEYWORD2
readAcc KEYWORD2
readGyro KEYWORD2
readAccGyro KEYWORD2
getAccelX_mss KEYWORD2
getAccelY_mss KEYWORD2
getAccelZ_mss KEYWORD2
Expand Down

0 comments on commit a3e58b4

Please sign in to comment.