Skip to content
This repository was archived by the owner on Oct 25, 2019. It is now read-only.

Commit 03b344d

Browse files
authored
Fix #2 by correcting order of magnetometer read in example
1 parent b6d0cb6 commit 03b344d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
accel, mag = lsm303.read()
2222
# Grab the X, Y, Z components from the reading and print them out.
2323
accel_x, accel_y, accel_z = accel
24-
mag_x, mag_y, mag_z = mag
24+
mag_x, mag_z, mag_y = mag
2525
print('Accel X={0}, Accel Y={1}, Accel Z={2}, Mag X={3}, Mag Y={4}, Mag Z={5}'.format(
2626
accel_x, accel_y, accel_z, mag_x, mag_y, mag_z))
2727
# Wait half a second and repeat.

0 commit comments

Comments
 (0)