Verified Commit 33b08df7 authored by koalo's avatar koalo Committed by Rahix
Browse files

feat(bhi160): App for BHI160

parent a907a06e
import bhi160
import display
import utime
disp = display.open()
bhi = bhi160.BHI160Accelerometer()
while True:
samples = bhi.read()
if len(samples) > 0:
disp.clear()
sample = samples[0]
disp.print("Accelerometer", posy=0)
disp.print("X: %f" % sample["x"], posy=20)
disp.print("Y: %f" % sample["y"], posy=40)
disp.print("Z: %f" % sample["z"], posy=60)
disp.update()
utime.sleep(0.1)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment