mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-12-22 13:35:48 +00:00
Update main.py
This commit is contained in:
parent
3ff2e4eece
commit
84d18b2764
8
main.py
8
main.py
|
@ -6,6 +6,12 @@ accel = lis3dh(bus,2,10)
|
|||
|
||||
print("LIS3DH initiated successfully!")
|
||||
|
||||
f = open("output.txt","x")
|
||||
print("X","Y","Z", file=f)
|
||||
f.close()
|
||||
|
||||
while True:
|
||||
[X,Y,Z] = accel.readAll()
|
||||
print("X: ",X,"\tY: ",Y,"\t Z: ",Z,"\n")
|
||||
with open("output.txt","a") as f:
|
||||
print("X: ",X,"\tY: ",Y,"\t Z: ",Z,"\n")
|
||||
print(X,Y,Z, file=f)
|
Loading…
Reference in a new issue