Skip to content

Commit 790a1e3

Browse files
authored
Merge pull request #19 from cparata/main
Fix some typos in LSM6DSOX_HelloWorld example
2 parents c9a185a + 7ef082d commit 790a1e3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/LSM6DSOX_HelloWorld/LSM6DSOX_HelloWorld.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void setup() {
5555
lsm6dsoxSensor.begin();
5656

5757
// Enable accelerometer and gyroscope, and check success
58-
if (lsm6dsoxSensor.Enable_X() == LSM6DSOX_OK && lsm6dsoxSensor.Enable_X() == LSM6DSOX_OK) {
58+
if (lsm6dsoxSensor.Enable_X() == LSM6DSOX_OK && lsm6dsoxSensor.Enable_G() == LSM6DSOX_OK) {
5959
Serial.println("Success enabling accelero and gyro");
6060
} else {
6161
Serial.println("Error enabling accelero and gyro");
@@ -95,7 +95,7 @@ void loop() {
9595
if (acceleroStatus == 1) { // Status == 1 means a new data is available
9696
int32_t acceleration[3];
9797
lsm6dsoxSensor.Get_X_Axes(acceleration);
98-
// Plot data for each axe in mg
98+
// Plot data for each axis in mg
9999
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");
100100
}
101101

@@ -104,8 +104,8 @@ void loop() {
104104
lsm6dsoxSensor.Get_G_DRDY_Status(&gyroStatus);
105105
if (gyroStatus == 1) { // Status == 1 means a new data is available
106106
int32_t rotation[3];
107-
lsm6dsoxSensor.Get_X_Axes(rotation);
108-
// Plot data for each axe in milli degres per second
107+
lsm6dsoxSensor.Get_G_Axes(rotation);
108+
// Plot data for each axis in milli degrees per second
109109
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");
110110
}
111111

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=STM32duino LSM6DSOX
2-
version=2.3.0
2+
version=2.3.1
33
author=SRA
44
maintainer=stm32duino
55
sentence=Ultra Low Power inertial measurement unit.

0 commit comments

Comments
 (0)