Create weight_NAU7802_Tim.py

This commit is contained in:
kolossos 2020-07-12 20:04:27 +00:00 committed by GitHub
parent b713a3f6f3
commit cd2ef403d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

10
weight_NAU7802_Tim.py Normal file
View File

@ -0,0 +1,10 @@
import nau7802py, time
myScale = nau7802py.NAU7802()
if myScale.begin():
while True:
currentReading = myScale.getReading()
currentWeight = myScale.getWeight()
print('Reading: ' + str(currentReading)+" "+ str(round(currentWeight, 4)))
time.sleep(1)