Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit 65537c9

Browse files
authored
Create testCompass.py
1 parent 3283064 commit 65537c9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/HMC5883L/testCompass.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# execfile('testCompass.py')
2+
import HMC5883L
3+
import gc
4+
import time
5+
m = HMC5883L2.HMC5883L()
6+
while True:
7+
m.readAxes()
8+
m.heading()
9+
print(m)
10+
time.sleep_ms(1000)
11+
gc.collect()

0 commit comments

Comments
 (0)