Skip to content

Commit 22e0407

Browse files
committed
as per instructions
1 parent a4621a4 commit 22e0407

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

examples/lsm6dsox_full_test.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,15 @@
99
sox.accelerometer_range = AccelRange.RANGE_16G
1010
print("Accelerometer range set to: %d G"%AccelRange.string[sox.accelerometer_range])
1111

12-
for accel_range in [AccelRange.RANGE_2G, AccelRange.RANGE_4G,
13-
AccelRange.RANGE_8G, AccelRange.RANGE_16G]:
14-
15-
sox.accelerometer_range = accel_range
16-
print("Gravity is %.2f ms^2 when accelerometer range is %d G"%
17-
(sox.acceleration[2], AccelRange.string[sox.accelerometer_range]))
18-
19-
print()
2012
sox.gyro_range = GyroRange.RANGE_500_DPS
2113
print("Gyro range set to: %d DPS"%GyroRange.string[sox.gyro_range])
22-
for gyro_range in [GyroRange.RANGE_250_DPS, GyroRange.RANGE_500_DPS,
23-
GyroRange.RANGE_1000_DPS, GyroRange.RANGE_2000_DPS]:
2414

25-
sox.gyro_range = gyro_range
26-
print("Non movement is %.2f degrees/s when gyro range is %d DPS"%
27-
(sox.gyro[2], GyroRange.string[sox.gyro_range]))
28-
print()
2915
sox.accelerometer_rate = Rate.RATE_12_5_HZ
3016
print("Accelerometer rate set to: %d HZ"%Rate.string[sox.accelerometer_rate])
3117

3218
sox.gyro_rate = Rate.RATE_12_5_HZ
3319
print("Gyro rate set to: %d HZ"%Rate.string[sox.gyro_rate])
3420

35-
print()
3621
while True:
3722
print("Accel X:%.2f Y:%.2f Z:%.2f ms^2 Gyro X:%.2f Y:%.2f Z:%.2f degrees/s"%
3823
(sox.acceleration+sox.gyro))

0 commit comments

Comments
 (0)