mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-11-10 01:35:50 +00:00
11 lines
238 B
Python
11 lines
238 B
Python
from lis3dh import *
|
|
|
|
print("Raspberry Pi Zero W, up and running!")
|
|
bus = smbus2.SMBus(1)
|
|
accel = lis3dh(bus)
|
|
|
|
print("LIS3DH initiated successfully!")
|
|
|
|
while True:
|
|
[X,Y,Z] = accel.readAll()
|
|
print("X: ",X,"\tY: ",Y,"\t Z: ",Z,"\n") |