Update print to print()
This commit is contained in:
parent
417335ce03
commit
3ceca1c99c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue