Update main.py

This commit is contained in:
Kacper 2022-03-01 14:26:58 +00:00
parent 84d18b2764
commit 123e092d4c

View file

@ -1,4 +1,5 @@
from lis3dh import *
from datetime import datetime
print("Raspberry Pi Zero W, up and running!")
bus = smbus2.SMBus(1)
@ -6,7 +7,8 @@ accel = lis3dh(bus,2,10)
print("LIS3DH initiated successfully!")
f = open("output.txt","x")
name = "output_"+datetime.now()+".txt"
f = open(name,"x")
print("X","Y","Z", file=f)
f.close()