Skip to content

Commit 817a51e

Browse files
committed
Add rotation sensor to Standalone sketch
1 parent b470afc commit 817a51e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/Standalone/Standalone.ino

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SensorXYZ accel(SENSOR_ID_ACC);
1212
SensorXYZ gyro(SENSOR_ID_GYRO);
1313
Sensor temp(SENSOR_ID_TEMP);
1414
Sensor gas(SENSOR_ID_GAS);
15+
SensorQuaternion rotation(SENSOR_ID_RV);
1516

1617
void setup()
1718
{
@@ -24,6 +25,7 @@ void setup()
2425
gyro.begin();
2526
temp.begin();
2627
gas.begin();
28+
rotation.begin();
2729
}
2830

2931
void loop()
@@ -40,5 +42,6 @@ void loop()
4042
Serial.println(String("gyroscope: ") + gyro.toString());
4143
Serial.println(String("temperature: ") + String(temp.value(),3));
4244
Serial.println(String("gas: ") + String(gas.value(),3));
45+
Serial.println(String("rotation: ") + rotation.toString());
4346
}
4447
}

0 commit comments

Comments
 (0)