Skip to content

Commit

Permalink
Fix some typos in LSM6DSOX_HelloWorld example
Browse files Browse the repository at this point in the history
  • Loading branch information
cparata committed Nov 17, 2022
1 parent c9a185a commit 7ef082d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions examples/LSM6DSOX_HelloWorld/LSM6DSOX_HelloWorld.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void setup() {
lsm6dsoxSensor.begin();

// Enable accelerometer and gyroscope, and check success
if (lsm6dsoxSensor.Enable_X() == LSM6DSOX_OK && lsm6dsoxSensor.Enable_X() == LSM6DSOX_OK) {
if (lsm6dsoxSensor.Enable_X() == LSM6DSOX_OK && lsm6dsoxSensor.Enable_G() == LSM6DSOX_OK) {
Serial.println("Success enabling accelero and gyro");
} else {
Serial.println("Error enabling accelero and gyro");
Expand Down Expand Up @@ -95,7 +95,7 @@ void loop() {
if (acceleroStatus == 1) { // Status == 1 means a new data is available
int32_t acceleration[3];
lsm6dsoxSensor.Get_X_Axes(acceleration);
// Plot data for each axe in mg
// Plot data for each axis in mg
Serial.print("AccelerationX="); Serial.print(acceleration[0]); Serial.print("mg, AccelerationY="); Serial.print(acceleration[1]); Serial.print("mg, AccelerationZ="); Serial.print(acceleration[2]); Serial.println("mg");
}

Expand All @@ -104,8 +104,8 @@ void loop() {
lsm6dsoxSensor.Get_G_DRDY_Status(&gyroStatus);
if (gyroStatus == 1) { // Status == 1 means a new data is available
int32_t rotation[3];
lsm6dsoxSensor.Get_X_Axes(rotation);
// Plot data for each axe in milli degres per second
lsm6dsoxSensor.Get_G_Axes(rotation);
// Plot data for each axis in milli degrees per second
Serial.print("RotationX="); Serial.print(rotation[0]); Serial.print("mdps, RotationY="); Serial.print(rotation[1]); Serial.print("mdps, RotationZ="); Serial.print(rotation[2]); Serial.println("mdps");
}

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=STM32duino LSM6DSOX
version=2.3.0
version=2.3.1
author=SRA
maintainer=stm32duino
sentence=Ultra Low Power inertial measurement unit.
Expand Down

0 comments on commit 7ef082d

Please sign in to comment.