Update print to print()

This commit is contained in:
funnym0nk3y 2021-02-02 15:37:54 +01:00 committed by GitHub
parent 417335ce03
commit 3ceca1c99c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -34,9 +34,9 @@ GPIO.add_event_detect(TACH, GPIO.FALLING, fell)
try:
while True:
print "%.f RPM" % rpm
print ("%.f RPM" % rpm)
rpm = 0
time.sleep(1) # Detect every second
except KeyboardInterrupt: # trap a CTRL+C keyboard interrupt
GPIO.cleanup() # resets all GPIO ports used by this function
GPIO.cleanup() # resets all GPIO ports used by this function